Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/muharik19/shop-backend
Simple e-commerce user shopping
https://github.com/muharik19/shop-backend
cronjob docker gin-gonic golang gorm jwt logrus postgresql postman swagger swagger-ui
Last synced: 3 days ago
JSON representation
Simple e-commerce user shopping
- Host: GitHub
- URL: https://github.com/muharik19/shop-backend
- Owner: muharik19
- Created: 2024-04-26T19:08:25.000Z (10 months ago)
- Default Branch: master
- Last Pushed: 2024-04-26T19:41:40.000Z (10 months ago)
- Last Synced: 2024-12-11T06:07:16.195Z (about 2 months ago)
- Topics: cronjob, docker, gin-gonic, golang, gorm, jwt, logrus, postgresql, postman, swagger, swagger-ui
- Language: Go
- Homepage:
- Size: 43 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
> Proposed gin framework based service .This project is still in development stage, any critic and suggestion all very based including but not limited to project name, function naming, folder structure etc. please refer to Readme.md.
## Prerequisite
- Install [go](https://golang.org/doc/install) in local machine for convenience development experience (auto complete, code sugestion, etc)
- Install golang plugin to your editor choice (ie. VSCode, Atom, Goland, Intellij IDE)
- [Docker](https://docs.docker.com/install/) and [docker-compose](https://docs.docker.com/compose/)## Install gin framework
- Create project with go.mod
- Create project folder structure### Folder structure.
├── constant # Define for define const
├── controller # Define for define handler endpoint
├── docs # Define documentation rest
├── middleware # Define middleware jwt, auth, cors
├── migration # Define for define sql
├── models # Define struct
├── pkg # Define function using general
├── repositories # Define data layer
├── routes # Define router
├── services # Define function that using for call surrounding system- Install gin (https://github.com/gin-gonic/gin)
go get -u github.com/gin-gonic/gin## How to run
Despite, it is possible to run this project in local machine Please follow this steps:
- swag init for generate document swagger
- Run apps gp to root project `go run main.go`.## Documentation API Swagger
[Swagger](http://localhost:9090/swagger/index.html)
## Documentation API Postman
[API](https://documenter.getpostman.com/view/4324137/2sA3Bt3Vee)