$ yarn
$ yarn dev
It will:
- Create .env file in app directory with following variables
- DATABASE_URL=
- APP_SECRET
- Create sqlite database
futurebit.sqlite
in app directory and run pending migrations - Start GraphQL API on http://localhost:5000/graphql
You can't build this on a low-resources MCU (<= 512MB ram), so there is a script to run the builder in a docker that simulates an OrangePI with Armbian and create a file with all the node_modules
compiled.
$ ./scripts/build
It will generate the file build//futurebit.tar.gz
Next step required:
- scp
futurebit.tar.gz
to the MCU - extract it in a tmp directory
- copy (overwrite)
node_modules
to/opt/apolloapi
directory - pull changes
- restart
apollo
service
In the system MCU there are several commands built-in:
Apollo API manager:
$ sudo systemctl start|stop|restart|status|... apollo
Miner manager:
$ sudo systemctl start|stop|restart|status|... bfgminer
Wifi manager:
$ nmcli help