mirror of
https://github.com/exane/not-gwent-online
synced 2024-10-31 10:36:53 +00:00
28 lines
491 B
JavaScript
28 lines
491 B
JavaScript
|
var Router = require('director').Router;
|
||
|
var router = new Router();
|
||
|
|
||
|
module.exports = {
|
||
|
|
||
|
init: function(app) {
|
||
|
router.on('/', function() {
|
||
|
app.view = 'landing';
|
||
|
app.section = 'landing';
|
||
|
});
|
||
|
|
||
|
router.on('/lobby', function() {
|
||
|
app.view = 'lobby';
|
||
|
app.section = 'inner';
|
||
|
});
|
||
|
|
||
|
this.configure();
|
||
|
router.init('/');
|
||
|
},
|
||
|
|
||
|
configure: function() {
|
||
|
router.configure({
|
||
|
notfound: function() {
|
||
|
router.setRoute('/')
|
||
|
}
|
||
|
})
|
||
|
}
|
||
|
}
|