Skip to content

Instantly share code, notes, and snippets.

@pmuellr
Created April 28, 2016 20:22
Show Gist options
  • Save pmuellr/bc6b0c5a5c81f4f27031f5b731b6a68b to your computer and use it in GitHub Desktop.
Save pmuellr/bc6b0c5a5c81f4f27031f5b731b6a68b to your computer and use it in GitHub Desktop.
http server that always returns 500 status
'use strict'
const http = require('http')
const server = http.createServer( (req, res) => {
res.writeHead(500, {'Content-Type': 'text/plain'})
res.end('500')
})
const PORT = process.env.PORT || "3000"
server.listen(PORT, function () {
console.log("server listening on http://localhost:" + PORT)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment