Skip to content

jaymku/gorestapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gorestapi

Quick start with GO lang to implement rest api and various operations.

Description

Rest api exposes GET AND POST methods to user.

Item structure is as below -

 type Item struct {
	ID   uuid.UUID `json:"id"`
	Name string    `json:"name"`
}

GET all items

get

POST add items to cache

post

Dependecies

  1. Docker

Executing

  1. Create a project direcotry (optional)
$ mkdir -p Projects 
$ cd Projects
  1. Clone the repo
~/Projects/$ gh repo clone jai2036/gorestapi
  1. Go to app directory (~/Projects/gorestapi/) and build the dockerfile.
~gorestapi/$ docker build -t jai/myapp .
  1. Run the image.
# list images and copy the id
~gorestapi/$ docker images
# Run your image 
~gorestapi/$ docker run -d -p 8080:8080 <image id>

About

Quick start with GO lang to implement rest API.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published