aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--app.js1
-rw-r--r--routes/index.js11
2 files changed, 12 insertions, 0 deletions
diff --git a/app.js b/app.js
index 87658fb..cf0d724 100644
--- a/app.js
+++ b/app.js
@@ -42,6 +42,7 @@ app.configure('development', function(){
*/
app.get('/', routes.index);
+app.get('/login', routes.login);
app.get('/users', user.list);
diff --git a/routes/index.js b/routes/index.js
index 93a632e..8681a0e 100644
--- a/routes/index.js
+++ b/routes/index.js
@@ -9,3 +9,14 @@ exports.index = function(req, res){
// res.render(TEMPLATE, OBJECT WITH VARIABLES)
res.render('index', { title: 'Express' });
};
+
+
+/*
+ * GET login page
+ *
+ * '/login'
+ */
+
+exports.login = function(req, res) {
+ res.render('login', {title: 'Logg inn' });
+}