forked from sebnema/offline_dl
-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.js
38 lines (35 loc) · 956 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
const url = require("url");
const directline = require("./dist/bridge");
const express = require("express");
const app = express();
const config = {
localDirectLine: {
hostUrl: "http://localhost",
port: "3000"
},
apbots:[
{
botId:"mybot",
botUrl:"http://localhost:3979/api/messages",
"msaAppId": "",
"msaPassword": ""
},
{
botId:"mybot2",
botUrl:"http://localhost:3978/api/messages",
"msaAppId": "",
"msaPassword": ""
},
]
};
directline.initializeRoutes(app, config);
// 一開始在 iis 中測試請用以下的 code
// var virtualDirPath = process.env.virtualDirPath || '';
// var app = require('express')();
// app.get(virtualDirPath + '/', (req, res) => {
// res.send(`virtualDirPath: ${virtualDirPath}`);
// });
// app.get(virtualDirPath + '/directline', (req, res) => {
// res.send(`virtualDirPath: ${virtualDirPath}/directline`);
// });
// app.listen(process.env.PORT);