Commit c17047b6 authored by Peter Lundin's avatar Peter Lundin
Browse files

Delete index.js

parent dc994aed
var express = require('express');
var router = express.Router();
const path = require('path');
const config = require('./config');
const pg = require('pg');
const winston = require('winston');
const connectionString = process.env.DATABASE_URL || config.storageConfig;
/* GET home page. */
router.get('/', function(req, res, next) {
return res.render('index', { title: 'cmdb: hem'});
});
router.get('/view/:id/:i', function(req, res, next) {
var id = 'cmdb: ' + req.params['id'];
var i = '' + req.params['i'];
winston.log('info', 'uri: /view/:id/:i', {
id: id,
i: i
})
if(i==='1')
return res.render('index_1', { title: id, index: i});
if(i==='2')
return res.render('index_2', { title: id, index: i});
else
return res.render('index', { title: id, index: i});
});
module.exports = router;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment