Running in Development
Start the server
Make sure you install the necessary NPM packages by running the following command in the root directory of the project:
npm install
In order to run the application in development mode, you need to open a terminal inside the root directory of the project and run the following command:
docker-compose up
This command will start the server and the database in Docker containers. The server will be running on port 7777
.
If the server is ran the first time, the available migrations will be automatically executed and populate the database with the necessary data.
On a successful start, you should see the following message in the terminal:
Server listen on : 7777
Access the server
You can access the server by opening the following URL in your browser:
http://localhost:7777
You should see the following message in your browser:
Follow video tutorial for running the server in development mode
Connect PostgreSQL GUI client
(In this demo, we are using DataGrip as the PostgreSQL GUI client)
- Open DataGrip and click on the
+
icon to add a new data source. - Select
PostgreSQL
from the list of data sources. - Fill in the necessary information (Data taken from the
.env
file):- Host:
localhost
- Port:
6543
- Database:
biddo-dev
- User:
biddo
- Password:
biddo
- Host:
You should be able to have available the following tables in the database:
Stop the server
In order to stop the server, you need to hit Ctrl + C
in the terminal where the server is running. This will stop the server and the database containers.
If you want to remove the containers, you can run the following command:
docker-compose down
If you want to remove the containers and the volumes (together with all the data), you can run the following command:
docker-compose down -v