This is the project files for CodeWorkr's API Authentication with Node series on YouTube.
- Introduction
- Cookies vs Tokens
- Node/Express API Setup
- Server-Side Validation
- MongoDB/Mongoose
- JSON Web Tokens
- Passport and Strategies
- Bcrypt Explained
- OAuth Explained
- Unit Testing
- Google OAuth
- Facebook OAuth
Series link: YouTube Playlist
$ git clone https://github.com/eXtremeXR/APIAuthenticationWithNode.git
then checkout the branch as follow
$ git checkout 'branch_name'
This project uses async/await it would be best if you use node 8+ after checkout be sure to run
$ npm install
installing using yarn
$ yarn install
To run the project use
$ npm run start-dev
starting the project using yarn
$ yarn start-dev
run unit tests
$ yarn test
genarate code coverage report
$ yarn report
run unit tests with nyc output in terminal
$ yarn nyc
run unit tests with nyc summery report
$ yarn text-report
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Lines |
---|---|---|---|---|---|
All files | 100 | 100 | 100 | 100 | |
controllers | 100 | 100 | 100 | 100 | |
users.js | 100 | 100 | 100 | 100 | |
routes | 100 | 100 | 100 | 100 | |
users.js | 100 | 100 | 100 | 100 |