Just a starter for Gin projects. It uses logrus for logging.
Name | Description | Default |
---|---|---|
API_PORT |
Port to listen to | 8080 |
API_LOG_FORMATTER |
Log formatter to use. Can be json or text . |
json |
API_LOG_LEVEL |
Log level to use | info |
To start the server you can use make:
make run
You can also use env vars to modify the behaviour of the server like this:
API_PORT=3000 API_LOG_FORMATTER=json API_LOG_LEVEL=info make run