Skip to content

Commit

Permalink
updates to server.js
Browse files Browse the repository at this point in the history
  • Loading branch information
kellyjandrews committed Jun 11, 2019
1 parent fbdebef commit b261e3d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion server.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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 = [
{
Expand Down

0 comments on commit b261e3d

Please sign in to comment.