-
Clone the repository
git clone https://github.com/Anik-nath/A2-Express-Ts-App-Server.git cd repository
-
Install dependencies
npm install
-
Set up environment variables
- Make .env file in src directory
- Edit the .env file.
- Example:
PORT=5000 DATABASEURL=[your mongodb connectiong url here]
- Ensure MongoDB is running locally
-
Run
npm run start:dev
-
Show live copy and paste this link in browser or you can use postman
http://localhost:5000/
-
All the routes to show
- http://localhost:5000/api/products/ to show all products
- http://localhost:5000/api/products/664c4ef425cfd66798abe37c to show single product by id
- http://localhost:5000/api/products?searchTerm=iphone to search products
- http://localhost:5000/api/orders/ to show all orders
- http://localhost:5000/api/[email protected] to show orders by email
anik-nath / a2-express-ts-app-server Goto Github PK
View Code? Open in Web Editor NEWAim To Develop a Express application with TypeScript as the programming language, integrating MongoDB with Mongoose for effective data management. To ensure data integrity through validation using Joi/Zod.
Home Page: https://assignment-2-umber-theta.vercel.app/