contacts-backend-go-echo

command module
v0.0.0-...-fb42b57 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 8, 2022 License: MIT Imports: 9 Imported by: 0

README

contacts-backend-go-echo

contacts-backend-go-echo is part of "contacts" project that is an initiative where we try to explore frontend and backend implementations in order to better understand it cutting-edge features. This repository presents a golang rest API sample.

stack

  • golang 1.17
  • echo
  • sqlite
  • gorm

features

  • migrations
  • high concurrent
  • small footprint

build and use

build a local docker image

docker build --tag contacts.backend.go.echo .

execute the local docker image

docker run -p 8010:80 contacts.backend.go.echo

create a new contact

curl --request POST \
  --url http://localhost/contacts \
  --header 'Content-Type: application/json' \
  --data '{
	"firstName": "Albert",
	"lastName": "Einstein",
	"phoneNumber": "2222-1111"
  }'

retrieve existing contacts

curl --request GET \
  --url http://localhost/contacts

more examples and details about requests on (link)

development

install golang 1.17+ (how to install golang)

resolve dependencies

go get

run

go run .

update

 go get -u -v
 go mod tidy

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL