Sinch Playground is a Node.js application designed to experiment with Sinch services.
To install the necessary dependencies, run:
npm installTo build the project, use:
npm run buildTo start the application, use:
npm startbuild: Compiles the TypeScript code usingtsc -p tsconfig.json.start: Runs the compiled JavaScript code usingnode index.js.
To test webhooks locally, you can use ngrok to expose your local server to the internet. Follow these steps:
-
Install
ngrokby following the instructions on the ngrok website. -
Start your local server:
npm start- In a new terminal window, start
ngrokon the port your local server is running (e.g., 3000):
ngrok http 3000ngrokwill provide a forwarding URL. Use this URL to configure your webhook endpoints. For example:
Forwarding https://abcd1234.ngrok.io -> http://localhost:3000
- Set the webhook URL in your Sinch service to the
ngrokforwarding URL.
Now, your local server can receive webhook events from Sinch services.
This project is licensed under the ISC License.