https://github.com/kevinmichaelchen/go-rest-api
Go REST API on top of MySQL
https://github.com/kevinmichaelchen/go-rest-api
Last synced: 3 months ago
JSON representation
Go REST API on top of MySQL
- Host: GitHub
- URL: https://github.com/kevinmichaelchen/go-rest-api
- Owner: kevinmichaelchen
- Created: 2017-11-05T21:11:47.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-01-19T16:41:19.000Z (over 7 years ago)
- Last Synced: 2025-02-23T22:43:39.367Z (3 months ago)
- Language: Go
- Homepage:
- Size: 35.2 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Getting started
To build Docker images and spin them up, just run
```bash
make
```To bring it all down, run
```bash
make stop
```## Using the API
```bash
make list-users
make create-user
make list-users
```## Why should we use Golang?
Our Golang server has a much lighter memory footprint than our Spring Boot apps, which do more or less the same thing.| Language | Framework | Memory Footprint | Video (asciinema) |
|:--------:|:-----------:|-----------------:|:--------------------------------------------------------:|
| Java | Spring Boot | 500 MB | [vid](https://asciinema.org/a/qlAlCexwOj3hygKDrSE6noHpN) |
| Golang | net/http | 5 MB | [vid](https://asciinema.org/a/72mpi0VXUF9K65oX5bZYqUWa1) |See [this gist](https://gist.github.com/kevinmichaelchen/22ac37452979b05f78e99f775e249659)
for a fuller explanation. At best, embedded Tomcat runs at 120MB, which is still 24x higher
than what Golang consumes. Out of the box, embedded Tomcat runs 100x higher than Golang.