Express + knex + pgsql + pgadmin + nodemon + babel + eslint for @google-cloud/functions-emulator
- Ensure
nvm
,gcloud
anddocker-compose
installed $ ./init-node.sh
to initialize node 6 and node dependencies- Assume pgsql will be used, edit
src/config.js
andsrc/secrets.js
for connection details - Edit
migrations/_init.js
for DB schema $ yarn sync-db
$ yarn dev
and open the URL- Write your code inside
src
, access pgAdmin when needed, reset DB when needed - Ensure gcloud is correctly setup, edit package.json for gcf deploy configs and
$ yarn deploy
$ yarn reset-db
$ yarn pgadmin
on your local/remote machine- If remote,
$ ssh <server ip> -L 31300:localhost:31300
- Open http://localhost:31300/browser/
- Login (email: admin@example.com, password: password)
- Create new server (host: ???, username: postgres, password: ???)