Heb support voor markdown toegevoegd. Ik kan nu beginnen met het schrijven van mijn pws.

This commit is contained in:
Bram van der Veen 2015-06-24 13:01:17 +02:00
parent d98d8a4dbd
commit 107e452ab5
5 changed files with 19 additions and 4 deletions

3
markdown/test.md Normal file
View file

@ -0,0 +1,3 @@
###Hallo daar!
Ik kan hier typen wat ik wil.

View file

@ -11,6 +11,7 @@
"dependencies": {
"express": "^4.13.0",
"express-less": "0.0.7",
"express-markdown": "0.0.6",
"jade": "^1.11.0"
}
}

View file

@ -0,0 +1,8 @@
html
head
title Hoe werkt Werkmanrooster ?
link(rel="stylesheet", href="/css/style.css", type="text/css")
link(rel="stylesheet", href="/css/skeleton.css", type="text/css")
body
.container!=markdown

View file

@ -5,4 +5,4 @@ html
link(rel="stylesheet", href="/css/skeleton.css", type="text/css")
body
h1 HEY THERE
.container=markdown

9
web.js
View file

@ -1,6 +1,7 @@
//web.js
var express = require('express');
var less = require('express-less');
var markdown = require('express-markdown');
var app = express();
@ -13,9 +14,11 @@ app.set('views', __dirname + '/resources/jade');
app.use('/css', less(__dirname + '/resources/less'));
// app.use('/js', express.static(__dirname + '/resources/js'));
app.use('/other', express.static(__dirname + '/resources/other'));
//Setup markdown middleware.
app.use(markdown({directory: __dirname + '/markdown', view: 'article'}));
app.get('/', function (req, res) {
res.render('home');
});
// app.get('/', function (req, res) {
// res.render('home');
// });
app.listen(1025);