This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> | |
<head > | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<title>Page Title | Site Name</title> | |
<meta name="description" content="page description"> | |
<link rel="stylesheet" href="style.css" type="text/css" media="all"> | |
</head> | |
<body> | |
<div id="header"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Page Title | Site Name</title> | |
<meta name="description" content="page description"> | |
<link rel="stylesheet" href="style.css"> | |
<!--[if lt IE 9]> | |
<script src="html5shiv.js"></script> | |
<![endif]--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html><title></title> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//server.js | |
var http = require('http'); | |
http.createServer(function (req, res) { | |
res.writeHead(200, {'Content-Type': 'text/plain'}); | |
res.end('Hello World\n'); | |
}).listen(3000, '127.0.0.1'); | |
console.log('Server running at http://127.0.0.1:3000/'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
echo "Hello World"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "note-app", | |
"description": "Simple HTML5 Note Application", | |
"version": "0.0.1", | |
"private": true, | |
"dependencies": { | |
"express": "*" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var express = require('express'); | |
var app = express(); | |
app.get('/notes', function(req, res) { | |
res.send([{note:'note1'}, {note:'note2'}, {note:'note3'}]); | |
}); | |
app.get('/notes/:id', function(req, res) { | |
res.send({id:req.params.id, title: "note title", description: "note description"}); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//routes/notes.js | |
exports.findAll = function(req, res) { | |
res.send([{note:'note1'}, {note:'note2'}, {note:'note3'}]); | |
}; | |
exports.findById = function(req, res) { | |
res.send({id:req.params.id, title: "note title", description: "note description"}); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//server.js | |
var express = require('express'), | |
notes = require('./routes/notes'); | |
var app = express(); | |
app.get('/notes', notes.findAll); | |
app.get('/notes/:id', notes.findById); | |
app.listen(3000); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"dependencies": { | |
"express": "*", | |
"mongoose": "*" | |
} |
OlderNewer