1.0.2 • Published 3 years ago

@slpv/httpstatus v1.0.2

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

httpstatus

A simple module for using HTTP codes as constants.

Install package:

npm i @slpv/httpstatus

Include package:

const HTTPStatus = require('@slpv/httpstatus');

Example using express.js framework

app.post("/", (req, res)) => {
    // TODO: Create method
    res
        .status(HTTPStatus.CREATED.code)
        .send(JSON.stringify({"message": "Created"}));
})
1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago