Restfull api with gin-gonic framework golang language
- Install golang
- Set gopath
- Install heroku CLI
- Install Postgresql
- Postman (optional) for testing
-
Clone this appp :
go get github.com/ervinismu/kejarmimpi
-
Replace the database connection code with your database connection in the
db.go
file -
Run by :
go run main.go
-
Open localhost:8000
-
Download this app :
go get github.com/ervinismu/kejarmimpi
-
Login akun :
Heroku login
-
Create apps :
heroku create -b https://github.com/heroku/heroku-buildpack-go.git
-
Remote apps in Heroku :
heroku git:remote -a <your-apps-name>
-
Create database postgresql :
Heroku addons:create heroku-postgresql:hobby-dev
-
Push :
Git push heroku master
-
Open app :
Heroku open
Testing your url with Postman or curl
Name | Url | Method |
---|---|---|
Register | <your_url>/register |
POST |
Login | <your_url>/login |
POST |
Logout | <your_url>/logout |
GET |
Get All Post | <your_url>/post |
GET |
Create Post | <your_url>/post |
POST |
Delete Post | <your_url>/post |
DELETE |
View Profile Data | <your_url>/profile |
GET |
Insert Profile Data | <your_url>/profile |
POST |
- Reza andriyunantoreza@gmail.com
- Ervin social.ervin@gmail.com
- Yudha yudhaariestra@gmail.com