Basic practice blog server written in go for CRUD operation
Project requires having Go 1.16 or above and postgreSQL. Once you clone(or go get) you need to configure the following:
- Change the DotEnv file according to your envirnment.
- Install Task runner
go get -u github.com/go-task/task/v3/cmd/task
- Install dependence
go mod download
task migration
for initializing database.task test
for testing project working.task run
to start project.
-
. ├── cmd main applications of the project │ └── server the API server application ├── pkg public library code │ ├── auth │ ├── error │ ├── middleware access log middleware │ ├── model │ ├── response │ └── util
- Write Database schema
- Create Database Trigger for like_count(posts), total_post(tags)
- Connect Database with GO
- Create Model Function in Golang
- Refactoring Code
- Write Unit Test of model
- Write Mock Test on model
- Design All API end-points
- Implement API in REST
- Implement JWT Authentication
- Write Authentication Middleware
- Write proper Error response
- Write proper documentaion for API endpoints
- Write Unit Test for API end points
- Heroku Deployment
- Write Docker File