Skip to content

Latest commit

 

History

History
59 lines (42 loc) · 1.11 KB

README.md

File metadata and controls

59 lines (42 loc) · 1.11 KB

Server

SW Requirements

In additon to the Postgres installation, the dbmate CLI is expected to be found in PATH and the postgrest binary is expected to be installed into the server/ subdirectory.

Generate JWT secret

cd server
openssl rand -base64 32 >> .jwtsecret

Database setup

cd server
psql -U postgres "CREATE DATABASE flutter_todomvc"
PGUSER=postgres ./dbmate.sh migrate

Database developemnt seed

cd server
psql -U postgres -d flutter_todomvc -f ./seed-development.sql

PostgREST setup

Download PostgREST

MacOS (intel, M1)

brew install postgrest
ln -s `which postgrest`

Linux

cd server
wget https://github.com/PostgREST/postgrest/releases/download/v11.2.2/postgrest-v11.2.2-linux-static-x64.tar.xz
tar -xJf postgrest-v11.2.2-linux-static-x64.tar.xz

Starting the server

cd server
PGUSER=postgres ./pgrest.sh