Technologies | Prerequisites | Getting Started
- Giving complaints coordinates that will find some address where you want to complain
- Register complaints whistleblower on database
- Typescript
- Node.js
- Docker
- Eslint
- Prettier
- Express
- Mapquest API - take the free account, get a consumer key and put it on .env.example file
- Tsyring
- Postgres
- jest
- Git
- Node.js v12.18.1 - LTS version
- Yarn v1.13 - package manager
- Docker with postgres database - follow the instructions to create a container that will contains the image of postgres.
- Account on Mapquest API
- Don't forget to put your consumer Mapquest key on .env.example file
- Install some http client to access routes or view on browser
- Suggestion: Insomnia
# Clone this repository
$ git clone https://github.com/esterandr02/Denouncing-api.git
# Go into the repository
$ cd Denouncing-api
# Install dependences
$ yarn
# Create a Docker container
$ sudo docker run --name postgres -e POSTGRES_PASSWORD=postgres -p 5432:5432 -d postgres
# Start container - (if your machine has been powered off)
$ docker start (container name/id)
# Ckeck port - (if port 5432 has being used)
$ lsof -i :5432
$ sudo kill -9 (process that is using the port)
# Construct database tables
$ yarn typeorm migration:run
# Start the Server
$ yarn dev
# route: includes post and get methods
http://localhost:3000/v1/denuncias
Now you can use the app :D
obs: Ctrl + C to stop the server.