https://github.com/fatihbaltaci/restapi-golang
RESTapi project with Go programming language
https://github.com/fatihbaltaci/restapi-golang
Last synced: 25 days ago
JSON representation
RESTapi project with Go programming language
- Host: GitHub
- URL: https://github.com/fatihbaltaci/restapi-golang
- Owner: fatihbaltaci
- Created: 2017-03-02T00:15:12.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-03-02T00:55:25.000Z (over 8 years ago)
- Last Synced: 2025-04-03T16:41:48.586Z (3 months ago)
- Language: Go
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# RESTapi-Golang
RESTapi project with Go programming languageRouters
* GET a event detail - /event/:id
* GET all events - /events
* POST new event details - /eventSteps
1. 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
```
