You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
534 B
20 lines
534 B
var express = require('express'); |
|
var page = require('./src/page'); |
|
var app = express(); |
|
|
|
app.use(express.static(__dirname + '/resources/public')); |
|
|
|
app.get('/:year/:month/:day/:title', function (req, res) { |
|
var params = req.params; |
|
var id = params.year + "/" + params.month + "/" + params.day + "/" + params.title; |
|
res.send("opening note " + id); |
|
}); |
|
|
|
app.get('/:link', function (req, res) { |
|
|
|
}); |
|
|
|
|
|
var server = app.listen(3000, function () { |
|
console.log('NoteHub server listening on port %s', server.address().port); |
|
}); |