https://github.com/tiendq/http-status
Returning HTTP status in a quick and easy way.
https://github.com/tiendq/http-status
http status
Last synced: 7 months ago
JSON representation
Returning HTTP status in a quick and easy way.
- Host: GitHub
- URL: https://github.com/tiendq/http-status
- Owner: tiendq
- License: mit
- Created: 2019-09-10T00:14:08.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-07-18T08:21:44.000Z (over 5 years ago)
- Last Synced: 2025-08-21T18:40:42.371Z (8 months ago)
- Topics: http, status
- Language: JavaScript
- Homepage:
- Size: 187 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# HTTP Status
Returning HTTP status in a quick and easy way. Just using unpopular built-in NodeJS [`http.STATUS_CODES`](https://nodejs.org/dist/latest-v12.x/docs/api/http.html#http_http_status_codes) property.
Example:
```js
const HttpStatus = require('@tiendq/http-status');
response.status(HttpStatus.OK).text(HttpStatus.Text.OK);
```
## Local Development
Installing and consuming the package locally:
```bash
cd ~/GitHub/http-status
npm link
cd ~/GitHub/hello-express # example project
npm link @tiendq/http-status
```
Cleaning up and using published package:
```bash
cd ~/GitHub/http-status
npm unlink
cd ~/GitHub/hello-express # example project
npm unlink @tiendq/http-status
npm i @tiendq/http-status
```
## About
Copyright (c) 2019 Tien Do (tiendq@gmail.com)
MIT License