Skip to content

Instantly share code, notes, and snippets.

@sethvincent
Created June 24, 2016 22:34
Show Gist options
  • Save sethvincent/5e32a9d34380f1f2bb1f58e01fe0574a to your computer and use it in GitHub Desktop.
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
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