Before running the server, ensure you have the following installed:
- Node.js
- Docker
To start the PostgreSQL database using Docker, run the following command:
npm run start-db
Set the PORT
and HOST
environment variables to configure the server. For example:
export PORT=8080 && export HOST=localhost
Once the database is running and the environment variables are set, start the server with:
npm run start
In a separate terminal, you can use the CLI client to send HTTP requests conveniently. Follow the instructions provided in the CLI Vehicle Client repository to pull the Docker image and run the CLI commands.
After completing the vehicle management process, stop the PostgreSQL database server with:
npm run stop-db
- Ensure Docker is running before starting the database.
- The CLI client simplifies sending HTTP requests to the server for testing and management purposes.