Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: about 2 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 5 years ago)
- Default Branch: master
- Last Pushed: 2020-07-18T08:21:44.000Z (over 4 years ago)
- Last Synced: 2024-10-05T11:46:08.770Z (3 months ago)
- Topics: http, status
- Language: JavaScript
- Homepage:
- Size: 187 KB
- Stars: 0
- Watchers: 2
- 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 linkcd ~/GitHub/hello-express # example project
npm link @tiendq/http-status
```Cleaning up and using published package:
```bash
cd ~/GitHub/http-status
npm unlinkcd ~/GitHub/hello-express # example project
npm unlink @tiendq/http-statusnpm i @tiendq/http-status
```## About
Copyright (c) 2019 Tien Do ([email protected])
MIT License