This is a backend application developed using Express JS and MongoDB. It includes functionality for managing Questions, Answers, and Users.
To run this application, you need to install the following libraries:
npm i express: ExpressJS (required)npm i express-async-handler: Required for handling asynchronous operations in Expressnpm i bcryptjs: Required for password hashingnpm i jsonwebtoken: Required for user authentication and access controlnpm i multer: Required for uploading avatarsnpm i nodemailer: Required for sending password reset emails to usersnpm i slugify: Required for generating slugs for each questionnpm i -D nodemon: Not necessary, but recommended for automatically refreshing the server on file changes during developmentnpm i dotenv: Required for loading environment variables, including MongoDB login credentials and other configurations
-
Install the above-mentioned libraries using the npm command.
-
Log in to MongoDB and create a project. Enter your project details in
config/env/config.env. -
I recommend using Postman to develop and test this project.
-
To start the project, run the command
npm run startin the terminal. -
You can quickly create dummy files for testing purposes. If you want to import dummy files, run
npm run import. If you want to delete all data, runnpm run deletein the terminal.