express-status-code
v1.0.0
Published
Constants http codes and functions for express.
Downloads
1
Maintainers
Readme
express-status-codes
Constants http status codes and functions for express.
Installation
# npm
npm install express-status-code
# yarn
yarn add express-status-code
Example
const { getStatusCode, StatusCodes, sendResponse } = require("express-status-code");
// const statusCode = getStatusCode("OK");
const statusCode = StatusCodes.OK;
sendResponse(response, statusCode, {
message: "OK"
});