First commit

This commit is contained in:
Bram van der Veen 2015-06-24 12:30:43 +02:00
commit 55045f4f7b
3 changed files with 38 additions and 0 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
node_modules

16
package.json Normal file
View file

@ -0,0 +1,16 @@
{
"name": "hoewerkt",
"version": "1.0.0",
"description": "A web thingy for my schoolpaper",
"main": "app.js",
"scripts": {
"test": "node app.js"
},
"author": "Bram van der Veen",
"license": "ISC",
"dependencies": {
"express": "^4.13.0",
"express-less": "0.0.7",
"jade": "^1.11.0"
}
}

21
web.js Normal file
View file

@ -0,0 +1,21 @@
//web.js
var express = require('express');
var less = require('express-less');
var app = express();
//Set up jade rendering engine.
app.set('view engine', 'jade');
app.disable('view cache');
app.set('views', __dirname + '/resources/jade');
//Set up all static directories for getting resources.
app.use('/css', less(__dirname + '/resources/less'));
// app.use('/js', express.static(__dirname + '/resources/js'));
app.use('/other', express.static(__dirname + '/resources/other'));
app.get('/', function (req, res) {
res.send('Hello world!');
});
app.listen(1025);