Created
November 29, 2019 15:26
-
-
Save romyilano/fb1f681fc5d7bcb99e5b147a3d6ddfbb to your computer and use it in GitHub Desktop.
son you must learn javascript again. at least this doesn't have all those semicolons =D
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// nice quick and dirty webserver | |
const http = require('http') | |
const port = process.env.PORT || 3000 | |
const server = http.createServer((req, res) => { | |
res.writeHead(200, { 'Content-Type': 'text/plain '}) | |
res.end('Hello world! this is a noob server') | |
}) | |
server.listen(port, () => console.log('server started on port ${port}; ' + ' press Ctrl-C to terminate...')) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment