This application aims to manage household items by categorizing them systematically. Session cookies are utilized for session management, with user information stored for three days. Admin Permissions: Upon logging in as an administrator, you can easily manage product and category operations. You have the capability to perform CRUD (Create, Read, Update, Delete) operations and customize the content as desired.
Home Page/
├── index.js // Express.js server setup
├── .env
├── src
┣ configs
┃ ┗ userController.js
┃ ┗ dbConnection.js
┣ controllers
┃ ┣ adminController.js
┃ ┣ productsController.js
┃ ┗ userController.js
┣ helpers
┃ ┗ paswordEncrypte.js
┣ middlewares
┃ ┣ auth.js
┃ ┣ errorHandler.js
┃ ┣ getCors.js
┃ ┣ postCors.js
┃ ┗ queryHandler.js
┣ models
┃ ┣ productsModel.js
┃ ┗ userModel.js
┣ routes
┃ ┣ adminRoutes.js
┃ ┣ productsRoutes.js
┃ ┗ userRoutes.js
┗ sync.js
├── package.json // Node.js project configuration
└── README.md // Project documentation
- Express.js: Fast and flexible Node.js web application framework.
- MongoDB: Flexible and scalable NoSQL database solution.
- Mongoose: Object Data Modeling (ODM) library for MongoDB.
- Cookie-session: Middleware for session management in Express applications.
- Cors: Middleware for Cross-Origin Resource Sharing (CORS) in Express.
- Dotenv: Node.js module used for loading environment variables.
- Express-async-errors: Helper module for asynchronous error handling in Express applications.
- Mongoose-validator: Powerful validation library for Mongoose.
- CRUD Operations Users can create, read, update, and delete books from the database.
- Middleware Middleware functions are implemented to handle requests, perform validations, and enhance security.
This is an example of how you may give instructions on setting up your project locally. To get a local copy up and running follow these simple example steps.
This is an example of how to list things you need to use the software and how to install them.
- npm
npm install npm@latest -g
Below is an example of how you can instruct your audience on installing and setting up your app. This template doesn't rely on any external dependencies or services.
- Clone the repo
git clone https://github.com/esmaaksoy/Home-backend
- Install NPM packages
npm install
- Create .env file in home directory.
HOST=localhost PORT=8000 MONGODB=ENTER YOUR Database adres or local: mongodb://127.0.0.1:27017/home SECRET_KEY=ENTER YOUR random letters and number, for example: jsl78dd9ff6f6s9jkd89Kkfnfd
- The project is ready, you can start using it now.
You can run: nodemon
To use the application, you can log in with the following email and password
email: admin@admin.com
password: Admin@1234