Skip to content

Commit

Permalink
adding app.js example to resources
Browse files Browse the repository at this point in the history
  • Loading branch information
ssmirr committed Oct 23, 2018
1 parent eab0ef1 commit 14d0b1a
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions resources/app.js
@@ -0,0 +1,14 @@
const http = require('http');

const hostname = '127.0.0.1';
const port = 8080;

const server = http.createServer((req, res) => {
res.statusCode = 200;
res.setHeader('Content-Type', 'text/plain');
res.end('Hello World\n');
});

server.listen(port, hostname, () => {
console.log(`Started Application http://${hostname}:${port}/`);
});

0 comments on commit 14d0b1a

Please sign in to comment.