Javascript HTTP Status is tiny HTTP status code utility library for readability.
$ npm i --save javascript-http-status
ES5
var status = require('javascript-status').default; // Don't forget the .default here.
var express = require('express')
app.get('/', function (req, res) {
res.send('Hello World!', status.http200Ok);
});
app.listen(3000, function () {
console.log('Example app listening on port 3000!');
});
ES6 import statement and usage
import status from 'javascript-status'
console.log(status.http201Created)