Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wisnuuakbr/simple-rest-go-echo
Simple RestAPI with Go, Echo, Gorm, and MySQL Database, MVC arch
https://github.com/wisnuuakbr/simple-rest-go-echo
echo-framework go gorm mvc-architecture mysql
Last synced: 4 days ago
JSON representation
Simple RestAPI with Go, Echo, Gorm, and MySQL Database, MVC arch
- Host: GitHub
- URL: https://github.com/wisnuuakbr/simple-rest-go-echo
- Owner: wisnuuakbr
- Created: 2023-08-29T14:10:46.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-02T07:48:43.000Z (about 1 year ago)
- Last Synced: 2023-09-03T05:08:17.077Z (about 1 year ago)
- Topics: echo-framework, go, gorm, mvc-architecture, mysql
- Language: Go
- Homepage: https://rest-go-production.up.railway.app
- Size: 22.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Simple RestAPI using GO Echo Framework
simple RestAPI with Go, Echo, Gorm, and MySQL
## Requirements
Simple RestAPI is currently extended with the following requirements.
Instructions on how to use them in your own application are linked below.| Requirement | Version |
| ----------- | ------- |
| Go | 1.18.4 |
| Mysql | 8.0.30 |## Installation
Make sure the requirements above already install on your system.
Clone the project to your directory and install the dependencies.```bash
$ git clone https://github.com/wisnuuakbr/simple-rest-go-echo
$ cd simple-rest-go-echo
$ go mod tidy
```## Configuration
Copy the .env.example file and rename it to .env
Change the config for your local server```bash
DB_HOST= localhost
DB_PORT= 3306
DB_USER= root
DB_PASSWORD=
DB_NAME= altera-course
SERVER_PORT= 8080
```## Running Server
```bash
$ go run main.go
```## Endpoints
These are the endpoints we will use to create, read, update and delete the course data.
```bash
POST course → Add new course data
GET course → Retrieves all the course data
PUT course/{id} → Update the course data
DELETE course/{id} → Delete the course data
```