Skip to content

indahmustika/golang-restapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple CRUD Rest API Using Golang

  • Create folder inside GOPATH/scr
  • Create folder named rest-crud
  • Project and dependencies initialization inside rest-crud folder
    • MySQL Database: go get github.com/go-sql-driver/mysql
    • Mux Router: go get github.com/gorilla/mux
  • Create main.go to set router and server
  • Create mysql.go to configure database
  • Create model.go to set data structure
  • Create user.go to make function for each route
  • Run project
    • go build
    • rest-crud.exe
  • Test using postman (post, put, delete type use x-www-form-urlencoded)

References

About

Simple Create Update Delete

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages