A simple REST API for CRUD services with 2 sample entities
- Register new user (admin/user)
- Login user
- Get a user data (show profile)
- Show all users data (only admin)
- Edit user data (update profile)
- Soft delete
- Insert new item
- Show one or all items
- Update item detail
- Soft delete
Click here to see the documentation.
- Go 1.19.3
- Gorm & MySQL
- Echo v4
- JWT
- Clone it
$ git clone https://github.com/hebobibun/golang-rest-api
- Go to directory
$ cd golang-rest-api
-
Create a new database
-
Rename
local.env.example
tolocal.env
-
Adjust
local.env
as your environment settings -
Run the project
$ go run .
Keep learning! ^^