Simple Go demo code. Use Go Mux to create an API server
It's a simple API used to demo how to deploy a production grade Golang API on AWS Elastic Container Service.
To run these commands you must be in the repository’s root.
In order for you to run the application locally on your machine, you will need the following environment variables
APP_DB_USERNAME
- Database usernameAPP_DB_PASSWORD
- Database passwordAPP_DB_NAME
- Database name
You can export
these env or create a env.sh
file and source it.
Example
export APP_DB_USERNAME=app
export APP_DB_PASSWORD=pleasechangeme
export APP_DB_NAME=api
Build
docker-compose build
Run
docker-compose up
Server is listening on localhost:8080
Build
docker-compose -f docker-compose-proxy.yml build
Run
docker-compose -f docker-compose-proxy.yml up
Server is listening on localhost:8000
Copyright (c) 2023 Calvine Otieno
Distributed under the MIT License. See the file LICENSE.