https://github.com/mikemenaker/go-service-template
Template for building web services in golang. Uses gorilla/mux as a router/dispatcher. This includes routing, logging, json serialization
https://github.com/mikemenaker/go-service-template
golang rest-api template web-app web-service
Last synced: 15 days ago
JSON representation
Template for building web services in golang. Uses gorilla/mux as a router/dispatcher. This includes routing, logging, json serialization
- Host: GitHub
- URL: https://github.com/mikemenaker/go-service-template
- Owner: mikemenaker
- License: mit
- Created: 2018-04-27T17:04:45.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-04-27T22:03:24.000Z (about 8 years ago)
- Last Synced: 2025-03-03T04:27:05.767Z (over 1 year ago)
- Topics: golang, rest-api, template, web-app, web-service
- Language: Go
- Homepage:
- Size: 2.93 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-service-template
Template for building web services in golang. Uses gorilla/mux as a router/dispatcher.
This includes routing, logging, json serialization
### How to run
`go run main.go` works well if your application or service has a single file, but for a more complex project with lots of files then you'll have to start using the proper go build tool and run the compiled executable.
```
go build && service.exe
```
`go build` will generate an executable called `service.exe` (on windows) and then run that executable by typing `service.exe`.
The app will bind itself to port 3030 (defined in `main.go`).