from server
This commit is contained in:
@@ -38,11 +38,13 @@ alexaApp.express({
|
|||||||
|
|
||||||
// now POST calls to /test in express will be handled by the app.request() function
|
// 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");
|
app.set("view engine", "ejs");
|
||||||
|
|
||||||
alexaApp.launch(function(request, response) {
|
alexaApp.launch(function(request, response) {
|
||||||
|
console.log("Alexa launch");
|
||||||
|
console.log(request);
|
||||||
const skill = db.collection('skill_list').findOne({_id: ObjectID(skillDbID)}, (err,result)=>{
|
const skill = db.collection('skill_list').findOne({_id: ObjectID(skillDbID)}, (err,result)=>{
|
||||||
if (err){
|
if (err){
|
||||||
response.say("I could not find desired skill")
|
response.say("I could not find desired skill")
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"alexa-app": "4.2.0",
|
"alexa-app": "4.2.0",
|
||||||
"body-parser": "^1.13.1",
|
"body-parser": "^1.13.1",
|
||||||
"ejs": "^2.3.1",
|
"ejs": "^2.5.7",
|
||||||
"express": "^4.13.0",
|
"express": "^4.13.0",
|
||||||
"isomorphic-fetch": "^2.2.1",
|
"isomorphic-fetch": "^2.2.1",
|
||||||
"mongodb": "^2.2.33",
|
"mongodb": "^2.2.33",
|
||||||
|
|||||||
10
backend/views/test.ejs
Normal file
10
backend/views/test.ejs
Normal 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>
|
||||||
Reference in New Issue
Block a user