Skip to content

Latest commit

Β 

History

History
49 lines (24 loc) Β· 1.65 KB

PROGRESS_LOG.md

File metadata and controls

49 lines (24 loc) Β· 1.65 KB

Progress Log

Initial Setup

βœ… Created server.js in the /src folder: This is where the server is initialized and started.

βœ… Updated package.json: Configured nodemon to spin up on server.js.

Application Structure

βœ… Created app folder: Contains the main application logic, including routes and other crucial components.

βœ… Created router folder: Defines all the routes.

βœ… Created controller folder: Contains all the controller functions.

βœ… Created model folder: Defines the user schema and model.

Middleware and Error Handling

βœ… Updated app folder: Added an error handler middleware to handle all errors.

βœ… Installed morgan: Logs incoming requests and added it to the middleware.

βœ… Added xss-clean package: Filters XSS requests (note: this package is out of date).

βœ… Added express-rate-limit: Limits the number of requests that can be sent in a particular time frame.

βœ… Added http-errors: Generates and handles HTTP errors.

βœ… Added dotenv: Manages environment variables.

Environment Configuration

βœ… Created .env file: Stores crucial details like MongoDB connection string.

βœ… Created secret.js in src: Manages the .env file and makes the data available to all project files.

Database Configuration

βœ… Created config/db.js in src: Manages the connection to the database using Mongoose and calls the function in app.js.

Routes and Services

βœ… Added getUser route: Includes pagination, search, and limiting functionality.

βœ… Added getUserById service: Created a route to get a particular user by ID.