Setup Instructions
See the developer guide and release notes at https://developers.google.com/actions/ for more details.
Steps for testing with Google Assistant
Create and setup project in Actions Console
- Use the Actions on Google Console to add a new project with a name of your choosing and click Create Project.
- Click
skip
- Go to actions under build, and click
Add your first action
- select custom intent, then
build
Create Action for the project
- Click
CREATE
(continued from above step) - Go to
settings
and clickexport and import
, then clickrestore from zip
. - zip the contents of
models/dialogflow/
and use that zip to restore the project.
Run Local Server
Run server local with colorful logs
npm install -g firebase-tools
touch functions/.runtimeconfig.json
and add fake keys (temporary workaround) refer thisfirebase init
(remove .firebaserc first)firebase use --add
(and choose your own firebase project)cd functions
andnpm install
DEBUG=ia:* npm start
Expose local server
To expose server to google assistant use ngrok its free plan should be enough.
To publish 5000 port use:
ngrok http 5000
you should find url https://<id>.ngrok.io/
.
Connect webhook to dialogflow
Go to the fullfillment section of your dialogflow draft copy of our app and after that you should use this url:
https://<id>.ngrok.io/<your project name>/us-central1/assistant
Setup Env
Options
- profile performance of requests
Env Variable:
PROFILE_REQUESTS=true
(false
by default)firebase functions:config:set performance.requests=true
How to make contributions?
create git branch feature/<name-of-feature>
, more
Use Mocha for continuous checking of your code quality and cover functionality by tests
npm run mocha -- --watch
npm test
Automatic style fixing, it doesn't solve all problems but could be very helpful
npm run lint -- --fix
Also it could be good practice to create your Pull Request earlier,
but add WIP:
at the beginning of its name! This way other developers
could see what are you working right now.