Technologies | How To Use | Information | Attention | License | Autor
This project was developed with the following technologies:
- Docker
- Docker-Compose
- GNU-Make v4.2.1
- Node.js v12.16.1
- Yarn v1.22.4
- Express
- TypeScript
- Knex
- PostgreSql
- Ts-Node-Dev
- Insomnia-Documenter
- VS Code with EditorConfig
# Clone this repository
$ git clone https://github.com/mac-alves/docker-nodejs-postgresql
# Go into the repository
$ cd docker-nodejs-postgresql/
# clone of the environment variables file
$ cp .env.example .env
# Lifts the docker with the necessary images
$ make up
# run migrations
$ make migrate
## ----------- useful commands ------------ ##
# rollback migrations
$ make rollback
# down docker
$ make down
# logs docker
$ make logs
The default api route (http://localhost:3000) provides access to complete documentation. All routes, methods and data can be found in the documentation. If you prefer to run the routes directly in the insomnia application the configuration file can be found in docs/Insomnia_2020-09-06.json
.
In the file of environment variables (.env
), contrast the key DB_URL
, which is nothing more than the combination of the keys DB_DATABASE
, DB_USER
and DB_PASSWORD
in a database connection string. If you change some of the independent keys (DB_DATABASE
, DB_USER
and DB_PASSWORD
) reflect the changes in DB_URL
following the pattern: postgresql://${DB_USER}:${DB_PASSWORD}@db:5432/${DB_DATABASE}
This project is under the MIT license. See the LICENSE for more information.
⚓ Mauricio Alves - Github - mac-alves