This is sort of big, so I'm not sure if you want this or not.
I moved pages under /page/ so it's possible to have other top-level routes that don't need to be dispatched manually from the /:page/*command handler.
One of the routes I added is /new, which redirects to a new wiki page.
This is useful when using --default-page since (as far as I can tell) there was previously no way to create a new random page when using that flag.
This also allows a lot of extraneous logic to be pulled out of handlePageRequest
This is sort of big, so I'm not sure if you want this or not.
I moved pages under
/page/
so it's possible to have other top-level routes that don't need to be dispatched manually from the/:page/*command
handler.One of the routes I added is
/new
, which redirects to a new wiki page. This is useful when using--default-page
since (as far as I can tell) there was previously no way to create a new random page when using that flag.This also allows a lot of extraneous logic to be pulled out of
handlePageRequest