Its a typescript,Node JS,Express project.Zod is used for verifing request/response formats. I have also used Prisma ORM with postgress DB. REST API backend for a food delivery app using Node.js. The primary focus is on a dynamic pricing module to calculate the total cost of food delivery based on various factors.
GET /fooddelivery/dynamicpricing
Header Parameters | Type | Description |
---|---|---|
zone |
CENTRAL / WEST / EAST / NORTH / SOUTH |
Required |
organization_id |
Number (1-5) |
Required |
total_distance |
Number |
Required |
item_type |
PERISHABLE / NONPERISHABLE |
Required |
Live Link : https://food-delivery-1-xmfa.onrender.com/docs/
- Just run below command, but before this add DB url in dockerfile
docker run -p 3000:3000 food-delivery-api
- Clone the project first
- Setup the .env file
DATABASE_URL=""
PORT= 3000
npm install
npm run dev
- To insert custom data in DB
- to go \src\db\db.ts
- Add your data
npx prisma generate
npx tsc -b
cd \dist\db
node db.js