express-api-jwt-auth
v0.0.5
Published
An express framework helper tool to create quick api jwt authentication system.
Downloads
4
Maintainers
Readme
express-api-jwt-auth
An express framework helper tool to create quick api jwt authentication system.
Install
sudo npm install -g express-api-jwt-auth
Usage
After install, you can type express-auth
command in the console the view the help page.
In a directory with express already installed, you can choose to generate a basic or full jwt authentication code, specifying the type as an argument to the command.
Example
express-auth --type full
Difference between the basic and full type
In the basic mode, not all stuffs are generated, the express-api-jwt-auth tool generate only these files:
- routes/api.js
- modules/utility.js
- modules/consts.js
Instead the full type generate theses files:
- routes/api.js
- modules/utility.js
- modules/consts.js
- models/user.js
- .env
Note : For most cases the full type is preffered as it generate all needed files and configurations to just get started quickly. You just need to launch your server and everything will just work like a charm.