- Docker -
https://docs.docker.com/get-docker/
- Docker-compose -
https://docs.docker.com/compose/install/
docker-compose up --build
The following message will be displayed:
"Access TecsolfacilWeb.Endpoint at http://localhost:4000
"
For demonstration I will be using the Thunder Client from VsCode on
To create a new user, send a POST request with the user information in JSON format to the endpoint http://localhost:4000/api/users/create
, as shown in the image below.
The password must be at least 8 characters long.
None of the fields can be empty.
To login, send a POST request with the user information in JSON format to the endpoint http://localhost:4000/api/users/login
.
When logging in, the user obtains a token that can be used for future operations.
The token is valid for 1 hour. After this period you will need to login again to get a new token
Now that you already have the token, we can use it to search for an address through the zip code sending a GET request to endpoint http://localhost:4000/api/cep/70083-900
Just add the desired zip code
The queried addresses are stored in the database. We can export to a csv file sending a GET request to endpoint http://localhost:4000/api/make/csv
To get the file just check your mailbox on your browser typing the address: http://localhost:4000/dev/mailbox
To update a user, you must log in.
Send a POST request to the http://localhost:4000/api/users/update
endpoint with the new user data and auth token.
To delete a user, you must log in.
Send a POST request to the http://localhost:4000/api/users/delete
endpoint, passing the auth token. The user referring to the token will be deleted.