TypeFast Server is the backend responsible for:
- Delivery TypeFast client build over HTTPS
- Providing an authentication interface over Facebook Graph API
- Providing access to data storage
- Execute stored routines within isolated processes
- Providing a scheduling mechanism for routines
npm install
mkdir ssl && cd ssl
openssl req -x509 -newkey rsa:2048 -keyout key -out crt -days 365 -nodes
Copy file:
cp config/local.dist.json config/local.json
Then edit config/local.json
, filling all the keys:
application_id
and application_secret
are available in the App manager (under settings).
For access_token
, create a admin system user in business manager. (Remember you have to claim your app in business manager before you can create system users for it). Once you have created an admin system user, generate a token with the ads_management
permission. Enter this token at access_token
.
For business_manager_id
fill in your business_id. You can find this value in the url when you are in business manager.
For bundle
, provide the absolute path to the provided schema bundle (more info here).
You will need to run a TypeFast server and a TypeFast worker.
npm run server
npm run dev-server
npm run worker
npm run dev-worker
npm run-script transpile
Include debug-break
parameter when running server
or worker
. e.g.
npm run dev-worker -- debug-break
Which should output: Debugger listening on [::]:5858
Attach the debugger
node debug localhost:5858
And then set a breakpoint and continue execution, e.g.
debug> sb('Worker.js', 87);
debug> c
This software is released under the Facebook Platform License.