๐ A simple REST API server used for managing bike deliveries & showing monthly/weekly stats. Project contains NestJS app as a backend (server). Database used in this project is PostgreSQL.
- Adding trips between two addresses with price and date
- Editing or deleting previously added trips
- Listing all added trips
- Listing weekly stats containing total distance and price from current week
- Listing monthly stats containing total distance, average distance and average price from current month splitted by days
๐ Documentation of all available endpoints can be found here: API Documentation
- Clone repository
git clone https://github.com/jakubcieslik99/bikelivery-server.git
โน๏ธ Instructions for running server app locally:
- Navigate to the server directory and install dependencies
cd bikelivery-server
npm install
- Run server app in development mode
npm run docker
npm run dev
โน๏ธ Instructions for building and running server app in production
- Transpile to production build
npm run build
- Run server app in production mode
npm install --omit=dev
npm run migration:run
npm run start:prod
โ๏ธ To run server app, you will need to add the following environment variables to your .env file
-
DIR
-
ENV
-
POSTGRES_VER
-
REDIS_VER
-
PORT
-
API_URL
-
APP_URL
-
POSTGRES_HOST
-
POSTGRES_PORT
-
POSTGRES_DB
-
POSTGRES_USER
-
POSTGRES_PASSWORD
-
REDIS_HOST
-
REDIS_PORT
-
REDIS_PASSWORD
-
COOKIE_SESSION_SECRET
-
JWT_ACCESS_TOKEN_SECRET
-
JWT_REFRESH_TOKEN_SECRET
-
GOOGLE_DIRECTIONS_API_KEY
๐ค Available API messages languages: EN
If you have any feedback, please reach out to me at โ๏ธ contact@jakubcieslik.com