xrazis
5 years ago
2 changed files with 29 additions and 0 deletions
@ -0,0 +1,16 @@ |
|||||
|
'use strict'; |
||||
|
|
||||
|
const express = require('express'); |
||||
|
|
||||
|
// Constants
|
||||
|
const PORT = 3000; |
||||
|
const HOST = '0.0.0.0'; |
||||
|
|
||||
|
// App
|
||||
|
const app = express(); |
||||
|
app.get('/', (req, res) => { |
||||
|
res.send('Hello World'); |
||||
|
}); |
||||
|
|
||||
|
app.listen(PORT, HOST); |
||||
|
console.log(`Running on http://${HOST}:${PORT}`); |
@ -0,0 +1,13 @@ |
|||||
|
{ |
||||
|
"name": "docker_web_app", |
||||
|
"version": "1.0.0", |
||||
|
"description": "Node.js on Docker", |
||||
|
"author": "First Last <first.last@example.com>", |
||||
|
"main": "server.js", |
||||
|
"scripts": { |
||||
|
"start": "node server.js" |
||||
|
}, |
||||
|
"dependencies": { |
||||
|
"express": "^4.16.1" |
||||
|
} |
||||
|
} |
Loading…
Reference in new issue