2019-08-02 12:56:16 +00:00
|
|
|
var express = require('express');
|
|
|
|
var app = express();
|
|
|
|
var bodyParser = require('body-parser');
|
2019-08-13 06:23:41 +00:00
|
|
|
var request = require('request'); //eslint-disable-line
|
2019-08-02 12:56:16 +00:00
|
|
|
var path = require('path');
|
|
|
|
var compression = require('compression');
|
|
|
|
|
|
|
|
app.use(bodyParser.json());
|
|
|
|
app.use(bodyParser.urlencoded({extended: true}));
|
|
|
|
|
|
|
|
app.use(compression());
|
|
|
|
|
|
|
|
app.use('*', function(req, res, next) {
|
|
|
|
if(process.env && process.env.PRODUCTION){
|
|
|
|
res.set('Cache-Control', 'public, max-age=86400');
|
|
|
|
}
|
|
|
|
else
|
|
|
|
res.set('Cache-Control', 'no-cache');
|
|
|
|
next();
|
|
|
|
});
|
|
|
|
|
|
|
|
//View engine setup
|
|
|
|
app.set('views', path.join(__dirname, 'views'));
|
|
|
|
app.set('view engine', 'ejs');
|
|
|
|
|
|
|
|
//Routes
|
|
|
|
app.get('/', function(req, res) {
|
|
|
|
res.render('index', {footerCards: true, cta:true, blackLogo:false,requestDemoCta:false});
|
|
|
|
});
|
|
|
|
|
|
|
|
app.get('/support', function(req, res) {
|
|
|
|
res.render('support', {footerCards: true, cta:true, blackLogo:false,requestDemoCta:false});
|
|
|
|
});
|
|
|
|
|
|
|
|
app.get('/pricing', function(req, res) {
|
|
|
|
res.render('pricing', {footerCards: true, cta:true, blackLogo:false,requestDemoCta:false});
|
|
|
|
});
|
|
|
|
|
|
|
|
app.get('/enterprise/demo', function(req, res) {
|
|
|
|
res.render('demo', {footerCards: false, cta:false, blackLogo:true,requestDemoCta:false});
|
|
|
|
});
|
|
|
|
|
|
|
|
app.get('/product/status-page', function(req, res) {
|
|
|
|
res.render('status-page', {footerCards: true, cta:true, blackLogo:false,requestDemoCta:false});
|
|
|
|
});
|
|
|
|
|
|
|
|
app.get('/product/uptime-monitoring', function(req, res) {
|
|
|
|
res.render('uptime-monitoring', {footerCards: true, cta:true, blackLogo:false,requestDemoCta:false});
|
|
|
|
});
|
|
|
|
|
|
|
|
app.get('/product/oncall-management', function(req, res) {
|
|
|
|
res.render('oncall-management', {footerCards: true, cta:true, blackLogo:false,requestDemoCta:false});
|
|
|
|
});
|
|
|
|
|
|
|
|
app.get('/customers', function(req, res) {
|
|
|
|
res.render('customers', {footerCards: true, cta:true, blackLogo:true,requestDemoCta:false});
|
|
|
|
});
|
|
|
|
|
|
|
|
app.get('/enterprise/resources', function(req, res) {
|
|
|
|
res.render('resources', {footerCards: false, cta:true, blackLogo:true,requestDemoCta:false});
|
|
|
|
});
|
|
|
|
|
|
|
|
app.get('/enterprise/overview', function(req, res) {
|
|
|
|
res.render('enterprise-overview.ejs', {footerCards: true, cta:true, blackLogo:false, requestDemoCta:true});
|
|
|
|
});
|
|
|
|
|
|
|
|
app.get('/legal', function(req, res) {
|
2019-08-13 06:23:41 +00:00
|
|
|
res.render('legal.ejs', {footerCards: true, cta:true, blackLogo:false, section: 'terms',requestDemoCta:false});
|
2019-08-02 12:56:16 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
app.get('/legal/terms', function(req, res) {
|
2019-08-13 06:23:41 +00:00
|
|
|
res.render('legal.ejs', {footerCards: true, cta:true, blackLogo:false, section: 'terms',requestDemoCta:false});
|
2019-08-02 12:56:16 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
app.get('/legal/privacy', function(req, res) {
|
2019-08-13 06:23:41 +00:00
|
|
|
res.render('legal.ejs', {footerCards: true, cta:true, blackLogo:false, section: 'privacy',requestDemoCta:false});
|
2019-08-02 12:56:16 +00:00
|
|
|
});
|
|
|
|
|
2019-10-23 19:02:18 +00:00
|
|
|
app.get('/legal/contact', function(req, res) {
|
|
|
|
res.render('legal.ejs', {footerCards: true, cta:true, blackLogo:false, section: 'contact',requestDemoCta:false});
|
|
|
|
});
|
|
|
|
|
|
|
|
app.get('/legal/hipaa', function(req, res) {
|
|
|
|
res.render('legal.ejs', {footerCards: true, cta:true, blackLogo:false, section: 'hipaa',requestDemoCta:false});
|
|
|
|
});
|
|
|
|
|
|
|
|
app.get('/legal/data-residency', function(req, res) {
|
|
|
|
res.render('legal.ejs', {footerCards: true, cta:true, blackLogo:false, section: 'data-residency',requestDemoCta:false});
|
|
|
|
});
|
|
|
|
|
2019-10-23 16:47:44 +00:00
|
|
|
app.get('/legal/gdpr', function(req, res) {
|
|
|
|
res.render('legal.ejs', {footerCards: true, cta:true, blackLogo:false, section: 'gdpr',requestDemoCta:false});
|
|
|
|
});
|
|
|
|
|
2019-08-02 12:56:16 +00:00
|
|
|
app.get('/legal/sla', function(req, res) {
|
2019-08-02 17:33:04 +00:00
|
|
|
res.render('legal.ejs', {footerCards: true, cta:true, blackLogo:false, section: 'sla',requestDemoCta:false});
|
2019-08-02 12:56:16 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
app.get('/enterprise/download-resource/:resourceName', function(req, res) {
|
|
|
|
res.render('download-resource.ejs', {footerCards: false, cta:false, blackLogo:true,requestDemoCta:false});
|
|
|
|
});
|
|
|
|
|
|
|
|
app.use(express.static(path.join(__dirname, 'public'), { maxAge: 2592000 }));
|
|
|
|
|
|
|
|
app.get('/*', function(req, res) {
|
2019-08-13 06:23:41 +00:00
|
|
|
res.render('notFound.ejs', {footerCards: true, cta:true, blackLogo:false, section: 'terms',requestDemoCta:false});
|
2019-08-02 12:56:16 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
app.set('port', process.env.PORT || 1444);
|
|
|
|
|
2019-08-13 06:23:41 +00:00
|
|
|
app.listen(app.get('port'), function() {
|
|
|
|
//eslint-disable-next-line
|
|
|
|
console.log('Server running on port : '+app.get('port'));
|
2019-08-02 12:56:16 +00:00
|
|
|
});
|
2019-08-13 06:23:41 +00:00
|
|
|
|