Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/antonybudianto/go-rest-starter

📦 Golang REST starter, dockerized
https://github.com/antonybudianto/go-rest-starter

docker docker-compose go go-modules golang gomod gomodule rest-api

Last synced: 4 months ago
JSON representation

📦 Golang REST starter, dockerized

Awesome Lists containing this project

README

        

# go-rest-starter

A starter for a Golang REST API.

## Getting started

You can use Docker and docker-compose for development

```sh
cp .env.example .env
docker-compose up
```

- Try visiting http://localhost:8080/ for adminer (see .env.example for DB login)
- Click "SQL Command", and copy content from `./files/db/create_table.sql` there, and click "Execute"
- Finally, visit http://localhost:8000/api/users to get the users.

### SSH

```sh
$ docker exec -it /bin/sh
$ docker-compose exec api sh
```

## Production

```sh
docker-compose -f docker-compose.production.yml build
docker-compose -f docker-compose.production.yml up
```

## Credits

https://github.com/ilourt/gocker

## License

MIT