[ui-server]: working test of UI server

This commit is contained in:
41666 2019-06-05 10:13:57 -05:00
parent 74e87ccbc7
commit 88959c59fe
No known key found for this signature in database
GPG key ID: DE08FAA8925DC747
6 changed files with 100 additions and 2 deletions

View file

@ -1,4 +1,7 @@
linters:
./**/*.{js,jsx}:
- standard --fix
- git add
./**/*.{ts,tsx}:
- tslint --fix
- stylelint --fix

View file

@ -0,0 +1,21 @@
module.exports = {
'/s/add': {
path: '/_internal/_server_add',
custom (router) {
router.get('/s/', ctx => ctx.redirect('/s/add'))
}
},
'/s/:id': {
path: '/_internal/_server',
noAutoFix: true,
custom (router) {
router.get('/_internal/_server', ctx => {
if (ctx.query.id) {
return ctx.redirect(`/s/${ctx.query.id}`)
}
return ctx.redirect('/s/add')
})
}
}
}