ch04s09 Add build-app project for lab
This commit is contained in:
parent
702686c81d
commit
4463a8bae2
2 changed files with 25 additions and 0 deletions
11
build-app/app.js
Normal file
11
build-app/app.js
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
var express = require('express');
|
||||
app = express();
|
||||
|
||||
app.get('/', function (req, res) {
|
||||
res.send('Simple app for the Building Applications Lab!\n');
|
||||
});
|
||||
|
||||
app.listen(8080, function () {
|
||||
console.log('Simple app for the Building Applications Lab!');
|
||||
});
|
||||
|
||||
14
build-app/package.json
Normal file
14
build-app/package.json
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"name": "nodejs-helloworld",
|
||||
"version": "1.0.0",
|
||||
"description": "Hello World!",
|
||||
"main": "app.js",
|
||||
"scripts": {
|
||||
"start": "node app.js"
|
||||
},
|
||||
"author": "Red Hat Training",
|
||||
"license": "ASL",
|
||||
"dependencies": {
|
||||
"express": "4.14.x"
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue