Skip to content

Commit a2228e9

Browse files
committed
add app.js, update scripts on package.json
1 parent a2208b5 commit a2228e9

2 files changed

Lines changed: 14 additions & 1 deletion

File tree

app.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
var express = require('express');
2+
var app = express();
3+
4+
app.get('/', function (req, res) {
5+
res.send('Hello World!');
6+
});
7+
8+
var port = process.env.PORT || 3000;
9+
app.listen(port, function () {
10+
console.log('app listening on port ' + port);
11+
});

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@
22
"name": "nodejs-hello-world",
33
"version": "0.1.0-SNAPSHOT",
44
"description": "nodejs-hello-world",
5-
"main": "index.js",
5+
"main": "app.js",
66
"scripts": {
7+
"dev": "nodemon --inspect=0.0.0.0:5858",
8+
"dev:brk": "nodemon --inspec-brk=0.0.0.0:5858",
79
"test": "echo \"Error: no test specified\" && exit 1"
810
},
911
"author": "Teracy",

0 commit comments

Comments
 (0)