Skip to content

chengchengpei/golang-api-learn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

This is for fun and learn. Trying to build REST API based on golang, and compare it with Django and Express. Not finished.

Refer the following tutorials:

https://thenewstack.io/make-a-restful-json-api-go/

How to generate random string

http://stackoverflow.com/questions/22892120/how-to-generate-a-random-string-of-a-fixed-length-in-golang

mgo

https://labix.org/mgo

Todo:

Add DB. Add logic to generate ramdom code. Refactor codes into several files. Now not necessary, too few codes.

How to run

Set GOPATH and GOBIN in .bashrc Run go get to install dependencies. Run go run main.go to run the server. Run mongod to start standalone mongod instance for dev/testing.

http

status code

https://golang.org/src/net/http/status.go

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages