Expose the port for your node server using ngrok. The given hostname will be used for your callback and configuration URLs.
ngrok http 3000
- Open https://developer.watsonwork.ibm.com/apps
- Click Create new app
- Give your app name and click Create
- Note the given App ID and App Secret
- Navigate to Listen to Events and click Add an outbound webhook
- Give your webhook name and set your callback URL. The URL should be
<NGROK_HOST>/webhook
. - Check message-created events and click Save
- Note the give Webhook Secret
-
Edit the environment variables in .env
-
Build
npm install
npm run build
- Run
npm run start
-
Edit the environment variables in .env
-
Build a Docker image
npm install
npm run build
docker build -f Dockerfile -t watsonwork-loopback-template:latest .
- Run
docker run -it -p 3000:3000 watsonwork-loopback-template:latest
- Open your local repository with Visual Studio Code
- Edit the environment variables in .env
- Select Debug -> Start Debugging
- Open https://developer.watsonwork.ibm.com/apps
- Navigate to Listen to Events
- Click Enable on your webhook