Skip to content

Instantly share code, notes, and snippets.

@davinci2015
Last active April 5, 2017 09:28
Show Gist options
  • Select an option

  • Save davinci2015/d0b7bf949ab057d1e0cc198c368693fb to your computer and use it in GitHub Desktop.

Select an option

Save davinci2015/d0b7bf949ab057d1e0cc198c368693fb to your computer and use it in GitHub Desktop.
var HttpStatus = require('http-status-codes');
response.status(HttpStatus.OK).send('ok');
response.status(HttpStatus.INTERNAL_SERVER_ERROR).send({
error: HttpStatus.getStatusText(HttpStatus.INTERNAL_SERVER_ERROR)
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment