A server app built using Shelf, configured to enable running with Docker.
- Create a new file named
.env
on the project root - Copy the content from
.env.example
to.env
- Change the values from
.env
file to the proper configurations - Run the following commando to generate the env dart class
dart run build_runner build -d
If you have Docker Desktop installed, you
can build and run with the docker compose
- First run the Postgresql database server
docker compose up postgresql
-
Once the postgrsql initiated you need to run the following scripts on the database (default proj_integrador_dev)
- Set up BD extensions: extensions.sql
- Create tables: create_tables.sql
- Create tables: directions_status.sql
You can run the scripts on the container terminal or using any postgresql client, such as:
-
Then build up the server
docker compose up dart-server
You should see the logging:
Server listening on InternetAddress('0.0.0.0', IPv4) with port 8080
CONECTADO AO BANCO DE DADOS POSTGRES