Skip to content

shefeg/golang-demo

Repository files navigation

Golang Demo

Build binary

GOOS=linux GOARCH=amd64 go build -o golang-demo
chmod +x golang-demo

Preconditions

  1. Install and configure PostreSQL db
  2. Create schema from file db_schema.sql

Start program

DB_ENDPOINT=<db_endpoint> DB_PORT=5432 DB_USER=<user> DB_PASS=<password> DB_NAME=<db_name> ./golang-demo

Use program examples

curl "http://localhost:8080/ping?url=https://google.com" --header "Content-Type:application/text"
curl -X POST "http://localhost:8080/video?id=1&title=Forest_Gump"
curl "http://localhost:8080/videos"
curl "http://localhost:8080/fibonacci?number=7"
curl "http://localhost:8080/memory-leak"

About

KSE golang demo app

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages