Created
June 24, 2016 22:34
-
-
Save sethvincent/5e32a9d34380f1f2bb1f58e01fe0574a to your computer and use it in GitHub Desktop.
example of mounting choo on a pathname like username.github.io/project-name, where basedir === project-name
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.router(function (route) { | |
var routes = [ | |
route('/', main), | |
route('/:page', main) | |
] | |
if (opts.basedir) { | |
return route(opts.basedir, routes) | |
} | |
return routes | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment