summaryrefslogtreecommitdiff
path: root/app.js
diff options
context:
space:
mode:
authorfahimkhan2016-09-20 15:25:40 +0530
committerfahimkhan2016-09-20 15:25:40 +0530
commit5f620e4c14b2245ec1382dc2e377fa037bc83703 (patch)
treea6c160c4aeaec56ea8a81e93ff12b348ec07c0a7 /app.js
parentaf0a1e7f2d785a6f0ef01cb6fd97725bbc27de1f (diff)
downloadOnline-NgSpice-Simulator-5f620e4c14b2245ec1382dc2e377fa037bc83703.tar.gz
Online-NgSpice-Simulator-5f620e4c14b2245ec1382dc2e377fa037bc83703.tar.bz2
Online-NgSpice-Simulator-5f620e4c14b2245ec1382dc2e377fa037bc83703.zip
Subject: Replace Hogan express with ejs
Description: Replace Hogan express with ejs. Added Contact and About page.
Diffstat (limited to 'app.js')
-rw-r--r--app.js12
1 files changed, 9 insertions, 3 deletions
diff --git a/app.js b/app.js
index b577162..11f5228 100644
--- a/app.js
+++ b/app.js
@@ -4,7 +4,9 @@ var express = require('express'),
fs = require('fs'),
os = require('os'),
shelljs = require('shelljs/global'),
- PythonShell = require('python-shell')
+ PythonShell = require('python-shell'),
+ ejs = require('ejs')
+
var app = express();
@@ -12,11 +14,14 @@ var app = express();
var scriptPath = path.join(__dirname,'scripts')
//Set views property
app.set('views',path.join(__dirname,'views'));
-//set Template engine
-app.engine('html',require('hogan-express'));
+
//Set it as View engine
app.set('view engine','html');
+//set Template engine
+app.engine('html',ejs.renderFile);
+
+
//Set Static public folder
app.use(express.static(path.join(__dirname,'public')));
@@ -29,6 +34,7 @@ app.set('host',config.host);
//Create server which listen app
var server = require('http').createServer(app);
+
//Socket.io is invoked by passing server
var io = require('socket.io')(server);