2017-02-09 01:52:37 +00:00
|
|
|
const express = require('express')
|
|
|
|
const router = express.Router()
|
2017-07-06 04:10:41 +00:00
|
|
|
|
2018-02-11 05:20:17 +00:00
|
|
|
/**
|
|
|
|
* Create/Edit document
|
|
|
|
*/
|
2018-08-09 04:07:15 +00:00
|
|
|
router.get(['/e', '/e/*'], (req, res, next) => {
|
2018-08-11 22:16:56 +00:00
|
|
|
res.render('editor')
|
2018-02-11 05:20:17 +00:00
|
|
|
})
|
|
|
|
|
2018-02-28 05:54:09 +00:00
|
|
|
/**
|
|
|
|
* Administration
|
|
|
|
*/
|
|
|
|
router.get(['/a', '/a/*'], (req, res, next) => {
|
2018-08-11 22:16:56 +00:00
|
|
|
res.render('admin')
|
2018-02-28 05:54:09 +00:00
|
|
|
})
|
|
|
|
|
2018-05-21 03:27:06 +00:00
|
|
|
/**
|
|
|
|
* Profile
|
|
|
|
*/
|
|
|
|
router.get(['/p', '/p/*'], (req, res, next) => {
|
2018-08-11 22:16:56 +00:00
|
|
|
res.render('profile')
|
2018-05-21 03:27:06 +00:00
|
|
|
})
|
|
|
|
|
2016-08-17 03:56:08 +00:00
|
|
|
/**
|
2016-08-29 05:21:35 +00:00
|
|
|
* View document
|
2016-08-17 03:56:08 +00:00
|
|
|
*/
|
2018-08-06 03:03:46 +00:00
|
|
|
router.get('/', (req, res, next) => {
|
2018-08-11 22:16:56 +00:00
|
|
|
res.render('welcome')
|
2017-10-10 01:43:43 +00:00
|
|
|
})
|
|
|
|
|
2018-08-06 03:03:46 +00:00
|
|
|
/**
|
|
|
|
* View document
|
|
|
|
*/
|
|
|
|
router.get('/*', (req, res, next) => {
|
2018-08-11 22:16:56 +00:00
|
|
|
res.render('page')
|
2018-08-06 03:03:46 +00:00
|
|
|
})
|
|
|
|
|
2017-02-09 01:52:37 +00:00
|
|
|
module.exports = router
|