API RESTful
- Tourism agency specialized in bringing tourists from around the world to visit Brazil's beaches, savannahs and forests
- NodeJs
- Insomnia
- Container Docker Postgres
- Postbird
- Swagger
- Express
- Sequelize
- Nodemon
- Sucrase
- Eslint
- Prettier
- dotEnv
- Cors
- Clone the application
$ https://github.com/naldomadeira/rest-api-travel.git
$ cd rest-api-travel
$ yarn install
Project setup it is necessary to rename .env.example
for .env
and make the necessary adjustments to connect your database
- Create docker container PostgresSQL
$ docker run --name database -e POSTGRES_PASSWORD=docker -p 5432:5432 -d postgres
- After configuring and creating the database,execute migrations
3.1. Run the script create the database with the name traveldb in the container named database
$ docker exec -it database psql -U postgres -c "CREATE DATABASE traveldb;"
$ docker exec -it database psql -U postgres -c "GRANT ALL PRIVILEGES ON DATABASE postgres TO postgres;"
3.2. Run sequelize-cli to run the migrations
$ yarn sequelize db:migrate
4.Use the command below to start the project:
$ yarn dev
5.Run the project and access the documentation at: http://localhost:3333/api/doc
They were entirely carried out in the automated environment of insomnia. Insomnia is an extremely useful tool for testing manually or automating the testing of any REST API.
This API was developed by Francinaldo Madeira