RESTapi project with Go programming language
* GET a event detail - /event/:id * GET all events - /events * POST new event details - /event1. Create Database and Tables
Run RESTapi_Go_Database.sql
file in MySQL database. EER Diagram of this database is shown below.
2. Get all the dependencies
In the main.go
file there are 2 imports from github. To get the dependencies:
go get
3. Build and Run
First of all, change username, password for MySQL connection on 17th line in main.go
go build main.go
main
4. Test
GET localhost:3001/events
GET localhost:3001/event/5
POST localhost:3001/event