Initial commit, including all apps previously in course

This commit is contained in:
Jordi Sola
2019-10-04 13:04:03 +02:00
parent a87e659954
commit f7cd8963ef
58 changed files with 2529 additions and 0 deletions

12
nodejs-app/package.json Normal file
View File

@@ -0,0 +1,12 @@
{
"name": "nodejs-app",
"version": "1.0.0",
"description": "Hello World App",
"main": "server.js",
"author": "Red Hat Training",
"license": "ASL",
"dependencies": {
"express": "4.20",
"html-errors": "latest"
}
}

13
nodejs-app/server.js Normal file
View File

@@ -0,0 +1,13 @@
var createError = require('http-error');
var express = require('express');
app = express();
app.get('/', function (req, res) {
res.send('Hello World from pod: ' + process.environment.HOSTNAME + '\n')
});
app.listen(8080, function () {
console.log('Example app listening on port 8080!');
});