Skip to content

mac-alves/docker-nodejs-postgresql

Repository files navigation

Design+Code

Docker+NodeJS+PostgreSql

Simple application to study the implementation of an api node js using docker and docker-compose.


GitHub language count GitHub top language GitHub repo size GitHub last commit

Technologies   |    How To Use   |    Information   |    Attention   |    License   |    Autor

🚀     Technologies

This project was developed with the following technologies:

‼️     Dependencies

ℹ️     How To Use

# 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

➕     Information

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.

‼️     Attention

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}

📝     License

This project is under the MIT license. See the LICENSE for more information.


Autor

Mauricio Alves - Github - mac-alves