server added
This commit is contained in:
@@ -1,2 +1,4 @@
|
|||||||
dump.rdb
|
dump.rdb
|
||||||
bin/
|
bin/
|
||||||
|
node_modules/
|
||||||
|
npm-debug.log
|
||||||
|
|||||||
+6
-2
@@ -2,8 +2,9 @@
|
|||||||
"name": "NoteHub",
|
"name": "NoteHub",
|
||||||
"version": "3.0.0",
|
"version": "3.0.0",
|
||||||
"description": "Free Pastebin for One-Off Markdown Publishing",
|
"description": "Free Pastebin for One-Off Markdown Publishing",
|
||||||
"main": "index.html",
|
"main": "server.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
"server": "node server.js",
|
||||||
"test": "echo \"Error: no test specified\" && exit 1"
|
"test": "echo \"Error: no test specified\" && exit 1"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
@@ -19,5 +20,8 @@
|
|||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/chmllr/NoteHub/issues"
|
"url": "https://github.com/chmllr/NoteHub/issues"
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/chmllr/NoteHub"
|
"homepage": "https://github.com/chmllr/NoteHub",
|
||||||
|
"dependencies": {
|
||||||
|
"express": "^4.13.3"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
var express = require('express');
|
||||||
|
var app = express();
|
||||||
|
|
||||||
|
/*
|
||||||
|
app.get('/', function (req, res) {
|
||||||
|
res.send('Hello World!');
|
||||||
|
});
|
||||||
|
*/
|
||||||
|
|
||||||
|
app.use(express.static(__dirname + '/resources/public'));
|
||||||
|
|
||||||
|
var server = app.listen(3000, function () {
|
||||||
|
var host = server.address().address;
|
||||||
|
var port = server.address().port;
|
||||||
|
|
||||||
|
console.log('NoteHub server listening at http://%s:%s', host, port);
|
||||||
|
});
|
||||||
Reference in New Issue
Block a user