This application so far does not make connections with the database, therefore, the returned values are saved in memory or searched in ViaCep API. If this same zip code is searched within a period of up to 5 minutes, the data will be searched in cache and no longer in ViaCep.
Yarn - A fast, effective and secure package manager. But it's just my preference, you can use Pnpm or Npm as well.
- Install project dependencies:
yarn install
- Start the server:
yarn dev
- You can make requests directly in Postman, importing the postman.json file. You find it in the directory:
src/docs
.-
To make a zip code consult, you need to have your access token. To own an access token, follow the steps below:
1 - Registrate ur user.
2 - Do login and copy your accessToken.
3 - Go to Zip Code Consult and paste your accessToken on Authorization > Type > Bearer Token. After this you ready to make your zip code consult.
-
If your server is already up and you want a more practical and free way to test, access the swagger documentation: http://localhost:4000/docs.
Authentication is required to access
Credentials:
- user: dev
- password: @ZipCode2023#