Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/parzibyte/api_rest_go_mysql
Creación de una API REST con Golang/Go y MySQL
https://github.com/parzibyte/api_rest_go_mysql
api go golang mysql rest
Last synced: 18 days ago
JSON representation
Creación de una API REST con Golang/Go y MySQL
- Host: GitHub
- URL: https://github.com/parzibyte/api_rest_go_mysql
- Owner: parzibyte
- License: mit
- Created: 2020-10-08T03:13:03.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2020-10-11T14:28:48.000Z (about 4 years ago)
- Last Synced: 2024-05-13T00:06:22.794Z (7 months ago)
- Topics: api, go, golang, mysql, rest
- Language: Go
- Homepage: https://parzibyte.me/blog/2020/10/12/go-api-rest-mysql/
- Size: 15.6 KB
- Stars: 1
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-golang-repositories - api_rest_go_mysql
README
# api_rest_go_mysql
Creación de una API REST con Golang/Go y MySQL## Installation
* Clone this repo
* Install the dependencies with:
```
go get github.com/go-sql-driver/mysql
go get github.com/gorilla/mux
go get github.com/joho/godotenv
```
* Create a database in MySQL
* Create a file called **.env** based on **.env.example**
* Configure credentials in **.env**
* In the database (you can use phpmyadmin or console) create
the tables according to **scheme.sql**
* Compile with `go build`
* Execute the exe, normally it will be **api_rest_go_mysql.exe**
(if Windows firewall ask, give it permission, no problem)
* Optionally if you ask me how I compile on Windows and format my code,
the command is `gofmt -w . && go build && api_rest_go_mysql`
* Now you can test the API with postman or anything else.
If you didn't make changes, it will be on
localhost:8000## About
Created by Parzibyte (https://parzibyte.me/blog)