Skip to content

william-carvalho/go-crud-mysql-rest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-crud-mysql-rest

Usage

Installation

https://golang.org/doc/install

Run

configure DATABASE_URL=mysql://root:new_password@localhost/posts
execute schema/init.sql
go run main.go

then

curl -d '{"id":"1", "title":"Black Panther", "content":"wakanda"}' -H "Content-Type: application/json" -X POST http://localhost:8005/posts

Performances with wrk

sudo apt-get install build-essential libssl-dev git -y
git clone https://github.com/wg/wrk.git wrk
cd wrk
make
# move the executable to somewhere in your PATH, ex:
sudo cp wrk /usr/local/bin

then

go run main.go

then

wrk -d1m http://localhost:8005/posts

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages