diff options
author | fahimkhan | 2016-09-20 15:25:40 +0530 |
---|---|---|
committer | fahimkhan | 2016-09-20 15:25:40 +0530 |
commit | 5f620e4c14b2245ec1382dc2e377fa037bc83703 (patch) | |
tree | a6c160c4aeaec56ea8a81e93ff12b348ec07c0a7 /app.js | |
parent | af0a1e7f2d785a6f0ef01cb6fd97725bbc27de1f (diff) | |
download | Online-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.js | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -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); |