gorest

command module
v0.0.0-...-c7eeaf8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 19, 2017 License: MIT Imports: 2 Imported by: 0

README

Basic REST API in Go

Running locally (needs posgres running)

# set env vars
go run main.go

Create a new post

curl -H "Content-Type: application/json" -X POST -d '{"title": "Hello world", "text": "intro"}' http://127.0.0.1:3000/posts

Get version

curl http://127.0.0.1:3000/version

Get posts

curl http://127.0.0.1:3000/posts

Build

GOOS=linux GOARCH=amd64 go build -ldflags "-X github.com/achanda/gorest/version.Version=`git rev-parse HEAD`" -o gorest .

Generate image

docker build . -t gorest

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
app

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL