Adventures from your phone
You'll need a phone number and an app, you can do this with the nexmo-cli.
# Find & purchase a number
nexmo number:search gb
nexmo number:buy <YOUR NUMBER>
# create your application and link number to it
# generate an event token to prevent unauthorised updates
nexmo app:create my-adventure https://example.com/answer https://example.com/event/<TOK>
nexmo link:app <YOUR NUMBER> <YOUR APP_ID>
Copy .env.example
to .env
- use this to set the following environmental variables:
API_KEY
&API_SECRET
- your Nexmo credentialsAPP_ID
- the application idHOST
- the host for callbackshttps://example.com:8080
(include protocol & no trailing slash)NUMBER
- the phone number linked to your app (for the ui)PORT
(optional) - which port to listen to (default 3000)
# install dependencies (or use yarn)
npm install
# start server on localhost:3000
node server.js
# optional - create public tunnel with ngrok
ngrok http 3000
The project comes with a bundled version of the frontend script (ui/build
). If you want to make any changes, then change any scripts, and run either:
npm run frontend:build
to compile build.js oncenpm run frontend:watch
to watch the code and compile on change (watch out, this can sometimes hang after compile errors)
The frontend uses: