Skip to content

obh/bug_example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

##Create database create database testDb;

##Create table

CREATE TABLE `RequestLog` (
  `id` int NOT NULL AUTO_INCREMENT,
  `merchantId` int DEFAULT NULL,
  `request` varchar(4000) DEFAULT NULL,
  `response` varchar(4000) DEFAULT NULL,
  `addedOn` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
);

clone repo and download

git clone git@github.com:obh/bug_example.git
go mod download

##Set env variables

export MYSQL_USER=<your username>
export MYSQL_PASSWORD=<your password"
export MYSQL_DB=testDb

Start service

go run main.go

##Run test

curl --request POST \
  --url http://localhost:7000/v1/request \
  --header 'Content-Type: application/json' \
  --data '{
	"MID": 27
}'

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages