From b261e3d7bbad3c7547b43f4a546a878331b96db6 Mon Sep 17 00:00:00 2001 From: Kelly J Andrews Date: Tue, 11 Jun 2019 11:45:18 -0400 Subject: [PATCH] updates to server.js --- server.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/server.js b/server.js index ad7799b..d5fcb8f 100644 --- a/server.js +++ b/server.js @@ -13,6 +13,7 @@ const speech = require('@google-cloud/speech'); // this is used with the heroku one-click install. // if you are running locally, use GOOGLE_APPLICATION_CREDENTIALS to point to the file location let config = null; + if (process.env.GOOGLE_APPLICATION_CREDENTIALS === undefined) { config = { projectId: 'nexmo-extend', @@ -26,13 +27,15 @@ if (process.env.GOOGLE_APPLICATION_CREDENTIALS === undefined) { const client = new speech.SpeechClient(config||null); const nexmo = new Nexmo({ + apiKey: "dummy", + apiSecret: "dummy", applicationId: process.env.APP_ID, privateKey: process.env.PRIVATE_KEY || './private.key' }); app.use(bodyParser.json()); -app.get('/answer', (req, res) => { +app.get('/ncco', (req, res) => { let nccoResponse = [ {