This project is a Node.js application that uses Express.js for the backend. It includes user authentication using JWT, password hashing with bcrypt, and CORS configuration. The project is structured to keep the code organized and maintainable.
- User Signup
- JWT Authentication
- Password Hashing
- CORS Configuration
- Sequelize ORM for database interaction
- Node.js
- npm
- MySQL
-
Clone the repository:
git clone https://github.com/ahmadshah2103/Notes.js/pull/2 cd Notes.js
-
Install dependencies:
npm install
-
Create a
.env
file as the.env.example
file in the root directory and add your environment variables: -
Run the application:
npm start
.
├── README.md
├── app.js
├── package-lock.json
├── package.json
├── src
│ ├── configs
│ │ ├── config.js
│ │ ├── constants.js
│ │ └── database.js
│ ├── controllers
│ │ ├── noteControllers.js
│ │ └── userControllers.js
│ ├── enums
│ │ └── userEnums.js
│ ├── index.js
│ ├── middlewares
│ │ ├── authenticate.js
│ │ ├── handleErrors.js
│ │ ├── validateAuthentication.js
│ │ └── validateNotes.js
│ ├── migrations
│ ├── models
│ │ ├── index.js
│ │ ├── note.js
│ │ └── user.js
│ ├── routes
│ │ ├── noteRoutes.js
│ │ └── userRoutes.js
│ ├── services
│ └── utils
│ ├── createOrUpdateUser.js
│ ├── generateUsername.js
│ ├── jwt.js
│ └── passwordHashing.js
├── template.js
└── test
├── integration
└── unit
- express
- cors
- dotenv
- jsonwebtoken
- bcrypt
- sequelize
- mysql2