Fling-server is an express app running on node.js & postgraphql backend for a flingapp front-end -- available here
For now, this server is only suitable for DEVELOPMENT purposes. Do not use in production!
IMPORTANT:
./INSTALL [flingapp_admin_pass] [flingapp_postgraphql_pass]
npm install -g pm2
npm install
ADMINPASS=[flingapp_admin_pass] npm start
- You must have postgreSQL running before running the install script.
- If you use
pg_ctl
instead ofhomebrew install postgresql
to initialise your postgreSQL server, you need to make sure that there is a default DB calledpostgres
and that there is a superuser for yourcurrentuser
before running the install script. (postgreSQL on Homebrew for OSX creates apostgres
db and sets your logged in user as a superuser.) - you need to pass the passwords you will use for the admin and postgraphql user to the install script, and also pass the password to npm start as environment variable
ADMINPASS
- API server runs on port
3001
. - You'll need to open a port on your server firewall
3001
usingufw
or put the server behind a reverse proxy. - You'll need a
.env
file with the sparkpost API key. Without it, emailing from queue jobs will not work
Use pm2
CLI to monitor the app performance
pm2 logs worker
to see the queue output including emails
pm2 logs main
to see logs from graphql server
npm run kill-dev
will kill the daemon and all of the running processes
/graphql
for all graphql queries
/graphiql
for self-documenting API reference
The master branch is protected and the default branch is set to development
.