gift-card-server/node_modules/nodemon/docs/index.js
Rodrigo Pedroso 3ac017a5ad Commit project
2019-06-19 10:46:14 -04:00

12 lines
No EOL
379 B
JavaScript

'use strict';
var http = require('http'),
fs = require('fs');
var page = fs.readFileSync(__dirname + '/index.html', 'utf8');
var server = http.createServer(function (req, res) {
res.writeHead(200, { 'content-type': 'text/html' });
res.end(page);
}).listen(process.env.PORT || 0, function () {
console.log('Listening on http://localhost:' + server.address().port);
});