An open API service indexing awesome lists of open source software.

https://github.com/eu-diogo-ferreira/nodejs-rest-api

🔐 A simple REST API with NodeJS, MongoDB and ExpressJS
https://github.com/eu-diogo-ferreira/nodejs-rest-api

bcryptjs express-js jwt mongodb nodejs

Last synced: 2 months ago
JSON representation

🔐 A simple REST API with NodeJS, MongoDB and ExpressJS

Awesome Lists containing this project

README

          



[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)

# NodeJS-REST-API
🔐 A simple REST API with NodeJS, MongoDB and ExpressJS


## Techlogies

This project was developed with **NodeJS**, **ExpressJS**, **BcryptJS** and **JWT**.

## Install

```
$ git clone git@github.com:ArikBartzadok/NodeJS-REST-API.git
# Recommend you to delete `.git`
$ cd <> && rm -r .git
```

## Development
```
$ npm start
# or
$ nodemon src/index.js
```

## Step by step

- Create the server application with ExpressJS and Body-parser
- Create the connection with MongoDB
- Create the model of collection
- Create the auth controller to register users in database
- Create system to encrypt the password, and manually disable the return of password in the request
- Create system to generate, authenticate and treat JWT
- Reorganize the project's directory structure
- Create module to recover password, including in the user model
- Recovering passwords with mailtrap
- Bug fixed in nodemailer and mailtrap <<< Error: Missing credentials for "PLAIN"
- Create route to reset password and authenticate token
- Bug fixed in decoded token
- Create routes to 'POST, GET, PUT and DELETE' projects
- Creating model relationships (Users, Pojects and Taks)

## Author

[Diogo Ferreira](https://diogodeveloper.netlify.app/)

## License

This project is open source and available under the [MIT License](LICENSE).



# Support me

[![ko-fi](https://www.ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/C0C81IJH6)