artemxgod / rest-api-go

Example of simple Web App organized according to the REST-API rules

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

REST-API-GO

Github repositories that might help

Tutorials

Helpful commands

Some commands from the course did not work for various reasons Here are the commands that I used instead:

  • example of creating migrations migrate create -ext sql -dir migrations create_users
  • example of using migration command migrate -path migrations/ -database postgres://postgres:postgres@localhost/restapi_dev?sslmode=disable up
  • example of curl usage with json curl -X POST -d '{"email":"ac@mail.ru", "password":"password"}' -v -i 'http://localhost:8080/users'
  • creating session with cookie http -v --session=user POST http://localhost:8080/sessions email=a1@mail.ru password=password
  • request to private info with cookie http -v --session=user http://localhost:8080/private/whoami
  • request with certain origin and cookie http -v --session=user http://localhost:8080/private/whoami "Origin: google.com"

Apps

  • Postman (for requests)
  • Openserver (for database)

About

Example of simple Web App organized according to the REST-API rules


Languages

Language:Go 99.3%Language:Makefile 0.7%