Skip to content

slpv/httpstatus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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"}));
})

About

HTTP status codes

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published