Sinch Playground is a Node.js application designed to experiment with Sinch services.
To install the necessary dependencies, run:
npm install
To build the project, use:
npm run build
To start the application, use:
npm start
build
: 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
ngrok
by following the instructions on the ngrok website. -
Start your local server:
npm start
- In a new terminal window, start
ngrok
on the port your local server is running (e.g., 3000):
ngrok http 3000
ngrok
will 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
ngrok
forwarding URL.
Now, your local server can receive webhook events from Sinch services.
This project is licensed under the ISC License.