Navigation Menu

Skip to content

Commit

Permalink
Removing ejs
Browse files Browse the repository at this point in the history
  • Loading branch information
amir-microsoft committed Dec 7, 2017
1 parent 6f6a5c1 commit 43b45bb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
1 change: 0 additions & 1 deletion package.json
Expand Up @@ -8,7 +8,6 @@
"dependencies": {
"cookie-parser": "^1.4.3",
"express": "^4.15.3",
"ejs": "^2.5.7",
"jsonwebtoken": "^7.4.1",
"request": "^2.81.0",
"request-promise": "^4.2.1"
Expand Down
8 changes: 4 additions & 4 deletions views/index.ejs → public/index.html
Expand Up @@ -4,10 +4,10 @@
<head>
<meta charset="UTF-8" />
<title>Health Bot</title>
<link href="https://hatenantstorageprod.blob.core.windows.net/public-websites/webchat/botchat.css?t=<%=ts%>" rel="stylesheet" />
<link href="stylesheets/style.css?t=<%=ts%>" rel="stylesheet" />
<script src="https://hatenantstorageprod.blob.core.windows.net/public-websites/webchat/botchat.js?t=<%=ts%>"></script>
<script src="index.js?t=<%=ts%>"></script>
<link href="https://hatenantstorageprod.blob.core.windows.net/public-websites/HealthBot-WebChat/botchat.css" rel="stylesheet" />
<link href="stylesheets/style.css" rel="stylesheet" />
<script src="https://hatenantstorageprod.blob.core.windows.net/public-websites/HealthBot-WebChat/botchat.js"></script>
<script src="index.js"></script>

</head>

Expand Down
5 changes: 0 additions & 5 deletions server.js
Expand Up @@ -24,11 +24,6 @@ function isUserAuthenticated(){
return true;
}

app.get('/', function(req, res) {
// this is done in order to prevent the brwoser from caching the css and js files until hard reload.
// we used a fixed 1 hour caching window, so within a maximum of an hour, the caching will be expired and hard reloaded.
res.render('index', {"ts" : Math.floor((new Date().getTime() / (1000 * 60 * 60)))})
});
app.get('/chatBot', function(req, res) {
if (!isUserAuthenticated()) {
res.status(403).send();
Expand Down

0 comments on commit 43b45bb

Please sign in to comment.