Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jig/gosample-httpjsonserver
Bare bones HTTP JSON server (sample code)
https://github.com/jig/gosample-httpjsonserver
Last synced: 6 days ago
JSON representation
Bare bones HTTP JSON server (sample code)
- Host: GitHub
- URL: https://github.com/jig/gosample-httpjsonserver
- Owner: jig
- Created: 2014-08-29T17:49:41.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2014-08-31T14:50:21.000Z (about 10 years ago)
- Last Synced: 2024-04-14T15:51:29.144Z (7 months ago)
- Language: Go
- Size: 2.79 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
HTTP server
===========This is Go (Golang) sample code for a minimal HTTP server. Learning purposes.
jsonserver-raw
--------------Barebones http json server, it just uses a `switch` based HTTP router.
```
$ ab -v 9 http://localhost:8080/sample1
$ ab -v 9 http://localhost:8080/sample2
```jsonserver-pkgjson
------------------Barebones http json server, it just uses a `switch` based HTTP router.
Codifies JSON with `encoding/json` Go package```
$ ab -v 9 http://localhost:8080/sample1
$ ab -v 9 http://localhost:8080/sample2
```jsonserver-jsonwithhandler
--------------------------Uses two server muxes
```
$ ab -v 9 http://localhost:8080/sample/1
$ ab -v 9 http://localhost:8080/sample/2
$ ab -v 9 http://localhost:8080/tmp/hola
```jsonserver-gocraft
------------------Uses [gocraft/web](https://github.com/gocraft/web). Sample from its README.md.