An Express framework project which returns a token upon successful authentication.
- Clone the project.
- Install Docker.
- Create an
.env
file and provide the following variables:
PGPASSWORD=your_password # Password for Postgresql
ACCESS_TOKEN=your_access_token
- Start the Docker container. Provide
-d
if you want to run the container in background.
docker compose up
- To stop the container
docker compose stop
# If you want to stop and delete the container at the same time, run this instead
docker compose down
- Install and open Postman.
- Create a new request.
- Set the request type (GET, POST, etc.) and enter the API endpoint you want to test e.g.,
http://localhost:3000/api/endpoint
. - Add the required parameters.
- Send the request and view the response.