Skip to content

Instantly share code, notes, and snippets.

@romyilano
Created November 29, 2019 15:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save romyilano/fb1f681fc5d7bcb99e5b147a3d6ddfbb to your computer and use it in GitHub Desktop.
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
// 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