This repository is an attempt to showcase few of my Golang skills. Let the games begin!
The following endpoint is hosted in a free cloud service (the cold start takes around 50 seconds):
https://ramengo-03li.onrender.com
Requires Go 1.22 or higher.
Set the .env
file using the .env.example
as a template.
Just run the following commands:
# Clone the repository
git clone [email protected]:matsuboshi/ramengo.git
# Change to the project directory
cd ramengo
# Set the .env file
cp .env.example .env
# Export the environment variables
source ./scripts/export_envs.sh
# Run the application
make run
Then follow the instructions along.
Just run the following commands:
# Clone the repository
git clone [email protected]:matsuboshi/ramengo.git
# Change to the project directory
cd ramengo
# Set the .env file
cp .env.example .env
# Build the image, create and run the container
docker-compose up -d --build
Then follow the instructions to test the API.
When you are done testing, you can stop and remove the container:
# Stop and remove the container
docker-compose down
Route | CURL |
---|---|
GET broths |
curl http://localhost:8080/broths -X GET \
-H 'x-api-key: ZtVdh8XQ2U8pWI2gmZ7f796Vh8GllXoN7mr0djNf' |
GET proteins |
curl http://localhost:8080/proteins -X GET \
-H 'x-api-key: ZtVdh8XQ2U8pWI2gmZ7f796Vh8GllXoN7mr0djNf' |
POST order |
curl http://localhost:8080/order -X POST \
-H "x-api-key: ZtVdh8XQ2U8pWI2gmZ7f796Vh8GllXoN7mr0djNf" \
-H "Content-Type: application/json" \
-d '{"brothId": "1", "proteinId": "1"}' |
Happy testing!