Food Delivery API Setup Guide
Here's a basic setup guide for setting up the project and database locally for your food delivery API:
-
Clone the Repository:
git clone https://github.com/your/repo.git cd repo
-
Install Dependencies:
npm install
-
Set Up Environment Variables:
-
Create a
.env
file in the root of your project and add the following variables:DB_USER="your_userName" DB_PASSWORD="your_password" DB_HOST="your_hostName" DB_PORT="your_portNumber" DB_NAME="your_databaseName"
-
Add your PostgreSQL database details correctly.
-
-
Set Up Database:
-
Navigate to the
db_schemas
directory:cd db_schemas
-
To create tables in the database, run:
node createTables.js
-
To insert data into tables, run:
node insertData.js
-
-
Start the Server:
-
In root directory (Navigate to root directory), run:
npm start
-
-
Use the API:
- Interact with the API endpoints at
http://localhost:3000
.
- Interact with the API endpoints at
-
Swagger Documentation:
- Access the Swagger documentation for your API at
http://localhost:3000/api-docs
. - Use this documentation to explore the available endpoints and test them.
- Access the Swagger documentation for your API at
This setup guide provides step-by-step instructions for setting up your food delivery API locally.