Setup Guide
-
Node.js (version 12 or above, use LTS version)
-
npm (or yarn)
-
PostgreSQL database (local or remote)
- Clone the repository:
git clone https://github.com/AnirudhMemani/delivery-price-calculator.git
- Install dependencies:
cd delivery-price-calculator
npm install
- Database Setup:
i. Create a Database: Create a new PostgreSQL database named 'assignment_postgres_deliveryapp' (or adjust the name as needed).
ii. Create a .env file at the root of your project. And add the following variables:
POSTGRES_HOST=<your-database-hostName>
POSTGRES_USER=<your-database-username>
POSTGRES_PASSWORD=<your-database-password>
POSTGRES_DB=<your-database-name>
DATABASE_URL=<your-prisma-url>
iii. Run Seed Scripts:
Execute the seed scripts (e.g., scripts/seed.js) to populate your database with initial data:
npx ts-node scripts/seed.js
- Running the Application
npm run dev
The API documentation is available on SwaggerHub: https://app.swaggerhub.com/apis-docs/NEMANIANIRUDH/DeliveryApp/1.0.0#/# Node App that calculates total delivery charges