mirror of https://github.com/JoeBiellik/paste
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
393 B
JavaScript
18 lines
393 B
JavaScript
9 years ago
|
var router = require('koa-router')();
|
||
|
var config = require('config');
|
||
|
var pastes = require('./controllers/pastes');
|
||
|
|
||
|
router.get('/', function *() {
|
||
|
yield this.render('index', {
|
||
|
pretty: config.prettyHtml,
|
||
|
title: 'Paste',
|
||
|
url: this.request.origin + '/',
|
||
|
highlights: config.highlights
|
||
|
});
|
||
|
});
|
||
|
|
||
|
router.post('/', pastes.create);
|
||
|
router.get('/:id', pastes.view);
|
||
|
|
||
|
module.exports = router;
|