Name: crud
Owner: go-br
Description: Simple master detail web form with pREST write in Golang
Created: 2017-11-04 11:28:10.0
Updated: 2018-02-19 20:59:54.0
Pushed: 2018-02-19 20:53:51.0
Size: 17
Language: Go
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Simple master detail web crud with Golang and pREST
Postgresql –> Database
pREST –> API REST
gatekeeper –> Autentication server
App frontend –> serv application pages (html)
Caddy –> Proxy
et github.com/prest/prest
et github.com/mholt/caddy/caddy
tedb gocrud
attention: To run pREST you need a precreated database
rt PREST_HTTP_PORT=3000
rt PREST_PG_HOST=127.0.0.1
rt PREST_PG_USER=postgres
ort PREST_PG_PASS=
rt PREST_PG_DATABASE=gocrud
rt PREST_PG_PORT=5432
rt PREST_JWT_KEY="your jwt key here"
rt PREST_MIGRATIONS=./postgresql
rt PREST_QUERIES_LOCATION=./queries
t migrate up
t
tekeeper
--user gocrud@example.com:1234 localhost:4000
Then get the jwt token and put the value on $JWT_TOKEN environment variable, to test pREST.
-i -H 'authorization: Bearer $JWT_TOKEN localhost:3000/databases
You must see your databases now.
ontendapp
y -conf ./caddy/Caddyfile