GitXplorerGitXplorer
f

RESTapi-Golang

public
0 stars
0 forks
0 issues

Commits

List of commits on branch master.

No commits found

There are no commits on branch master.

README

The README file for this repository.

RESTapi-Golang

RESTapi project with Go programming language

Routers

* GET a event detail - /event/:id * GET all events - /events * POST new event details - /event

Steps

1. Create Database and Tables

Run RESTapi_Go_Database.sql file in MySQL database. EER Diagram of this database is shown below.

alt tag

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

alt tag

4. Test

GET localhost:3001/events

5

GET localhost:3001/event/5

6

POST localhost:3001/event

7