diff options
Diffstat (limited to 'index.js')
-rw-r--r-- | index.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/index.js b/index.js new file mode 100644 index 0000000..f5f5b4e --- /dev/null +++ b/index.js @@ -0,0 +1,13 @@ +var http = require('http'); +var fs = require('fs'); + +const PORT=3000; + +fs.readFile('./index.html', function (err, html) { + + if (err) throw err; + + http.createServer(function(request, response) { + response.write(html); + }).listen(PORT); +});
\ No newline at end of file |