README ¶
go-rest-api
go-rest-api is a playground for me to explore how to write Go micro-services from scratch.
Installation
The project uses Go modules, so you'll need Go >= 1.11.
You'll also need SQLite.
git clone https://github.com/sophiabrandt/go-rest-api.git
Usage
- Migrate and seed the SQLite database.
go run ./cmd/admin -action="migrate"
go run ./cmd/admin -action="seed"
Or use Makefile
:
make seed
- Run the server. Default port is 4000, you can change it via command line flag.
go run ./cmd/server
# or go run ./cmd/server -addr=":8000"
Or use Makefile
:
make run
Example endpoints:
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
License
Apache 2.0 License, see LICENSE
.
Acknowledgments
Click to show internal directories.
Click to hide internal directories.