Skip to content

knoxknot/blogapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Building a Blog API in Go


This repository describes building a blog API to post, retrieve, update and delete contents. I have also written an article on medium that ties to this repository.

Building an Image

For Local Operation

  • docker build . -t blogapi #build the image
  • docker run -d -p 8080:8080 --name blogapi blogapi #run the image

For Remote Operation

  • TAG=git tag -l | tail -n1 && echo $TAG #get the latest project tag
  • docker login #provide your dockerhub user name and password
  • docker build . -t knoxknot/blogapi:$TAG -t knoxknot/blogapi:latest #build the image for push to repository
  • docker push knoxknot/blogapi:$TAG #push image to repository
  • docker push knoxknot/blogapi:latest

Testing the Endpoints Using Curl

About

A Simple Go Blog Api

Resources

Stars

Watchers

Forks

Packages

No packages published