Disclaimer - this is not an official example, provided AS-IS, use at your own risk.
NB - actions on Sync objects used in this example are paid.
To start you will need following things:
- Twilio Account
- Twilio Account SID (starts with
AC
prefix) and Auth Token - Twilio Signing Key and its Signing Key Secret
- Node.JS installed
You need to create a service instance if you don't have one yet (replace ACxxx
and your_auth_token
correspondingly):
curl -X POST https://sync.twilio.com/v1/Services \
-u ACxxx:auth_token
From response you'll get service instance SID which has IS
prefix.
Create a config.json
file in the root folder of this example with same structure as example.config.json
and fill all the fields.
The port
you're using can be any free port.
Run npm install
once.
To start backend simply run:
npm start
To access it you can simply open a link it wrote in the console output, something like: http://localhost:8080.
Open as many tabs as you want. You can write in all of them and others will syncronise their state.
To simplify sharing this example also provides NGROK url, which can be shared with everybody and allow access to your local backend as long as it is running.
NB - Your JWT tokens can be acquired by this URL!