A barebones API running in Docker to verify data communication
- Make a
.env
file like this (change the variable to whatever port you want to use to connect to the container)
HOST_PORT=3000
- Use the provided Docker Compose file and just run
docker-compose --env-file .env up -d
Alternatively just edit the Docker Compose file to declare the port inline and run docker-compose up -d
.
Run npm start
to start the server
Send your requests to localhost:3000
or whatever you configured the port to be.
Each endpoint will log some data about the request being sent.
Sends back an OK with "Hello" as the response body
Sends back an OK with the same body you passed it.