Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sparkbox/marshmallows
A basic auth middleware for Express
https://github.com/sparkbox/marshmallows
Last synced: 5 days ago
JSON representation
A basic auth middleware for Express
- Host: GitHub
- URL: https://github.com/sparkbox/marshmallows
- Owner: sparkbox
- Created: 2016-09-19T14:58:34.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-11-29T19:47:00.000Z (about 6 years ago)
- Last Synced: 2024-12-17T02:03:10.083Z (about 1 month ago)
- Language: JavaScript
- Size: 1.95 KB
- Stars: 0
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Marshmallows
Easily add basic auth to any express app.
1. Install in your project: `npm i marshmallows --save`.
2. Require into your app. `const auth = require('marshmallows');`
3. Use for _every_ request in your app via. `app.use(auth, express.static('./dist'));`
4. Add `ENV` variables `USER` and `PASS` for credentials.
5. Run your app with `NODE_ENV=production`.