from server

This commit is contained in:
Bilal
2018-01-05 22:28:55 +00:00
3 changed files with 14 additions and 2 deletions

View File

@@ -38,11 +38,13 @@ alexaApp.express({
// now POST calls to /test in express will be handled by the app.request() function
// from here on you can setup any other express routes or middlewares as normal
// from here on you can setup any other express routes or middlewares as nor
app.set("view engine", "ejs");
alexaApp.launch(function(request, response) {
console.log("Alexa launch");
console.log(request);
const skill = db.collection('skill_list').findOne({_id: ObjectID(skillDbID)}, (err,result)=>{
if (err){
response.say("I could not find desired skill")

View File

@@ -6,7 +6,7 @@
"dependencies": {
"alexa-app": "4.2.0",
"body-parser": "^1.13.1",
"ejs": "^2.3.1",
"ejs": "^2.5.7",
"express": "^4.13.0",
"isomorphic-fetch": "^2.2.1",
"mongodb": "^2.2.33",

10
backend/views/test.ejs Normal file
View File

@@ -0,0 +1,10 @@
<div style="white-space:pre;border:1px solid black;margin:5px;padding:5px;font-family:monospace;">
Schema:
<%=schema%>
Utterances:
<%=utterances%>
</div>