First commit
This commit is contained in:
commit
55045f4f7b
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
node_modules
|
16
package.json
Normal file
16
package.json
Normal 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
21
web.js
Normal 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);
|
Loading…
Reference in a new issue