This a server for to found project . To Found is a platform where people can post found and lost items. Anyone can search for an item that has been posted, and if someone finds a posted item, they can contact the original poster. To Found
- All apis protected
- Code Readable And Strutered
- User Verification Using JWT
- Mongoose Schema Models
- CRUD Operation
- cookie-parser (^1.4.7)
- cors (^2.8.5)
- dotenv (^16.4.7)
- express (^4.21.2)
- jsonwebtoken (^9.0.2)
- mongoose (^8.9.2)
root
├── controllers
│ ├── auth.controller.js
│ └── post.controller.js
├── db
│ └── dbConnect.js
├── middlewares
│ ├── VerifyOrigin.js
│ └── VerifyUser.js
├── models
│ ├── post.model.js
│ ├── recover.model.js
│ └── subscribe.model.js
├── node_modules
├── routes
│ └── main.routes.js
├── .env
├── .env.local
├── .gitignore
├── app.server.js
├── package.json
├── package-lock.json
└── README.md
Follow these steps to set up the project locally on your machine.
Prerequisites
Make sure you have the following installed on your machine:
Cloning the Repository
git clone https://github.com/programming-hero-web-course2/b10-a10-server-side-StackMastery
cd b10-a10-server-side-StackMastery
Installation
Install the project dependencies using npm:
npm install
Configure
Rename the .env.example file to .env and fill all env
PORT=YOUR_SERVER_PORT
MONGO_DB_URI=YOUR_MONGO_DB_CONNECTION_STRING
JWT_SECRET=YOUR_JWT_SECRET
CORS_ORIGIN=http://localhost:5173
Running the Project
npm run dev
Open http://localhost:3000 in your browser to view the project.