From b9a3e09ad5a7673f64556d1dba122ed4c4fac980 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 7 Mar 2016 11:33:59 +0100 Subject: Prepare folders structure for angular app --- controllers/views.js | 27 --------------------------- 1 file changed, 27 deletions(-) delete mode 100644 controllers/views.js (limited to 'controllers/views.js') diff --git a/controllers/views.js b/controllers/views.js deleted file mode 100644 index aa9718079..000000000 --- a/controllers/views.js +++ /dev/null @@ -1,27 +0,0 @@ -'use strict' - -var express = require('express') - -var cacheMiddleware = require('../middlewares').cache - -var router = express.Router() - -router.get(/^\/(index)?$/, cacheMiddleware.cache(), getIndex) -router.get('/partials/:directory/:name', cacheMiddleware.cache(), getPartial) - -// --------------------------------------------------------------------------- - -module.exports = router - -// --------------------------------------------------------------------------- - -function getIndex (req, res) { - res.render('index') -} - -function getPartial (req, res) { - var directory = req.params.directory - var name = req.params.name - - res.render('partials/' + directory + '/' + name) -} -- cgit v1.2.3