Blaze Todos example routes isn't in lib folder

Flow router for example blaze Todos app is imported only on client side, while the getting started readme for the FlowRouter repo instructs to place it inside lib folder. I’m tangled up in the web of imports enough that I doubt that it’s strictly imported from imports/startup/client/index.js.

The FlowRouter docs are a bit dated. While you can definitely still put your router config file in a shared common directory, like a /lib directory, this isn’t necessarily the recommended way forward. The todos app demonstrates how to reference your router config if you’re levearging Meteor’s ES2015 module support. The router config is only imported on the client side as the todos app is only leveraging client side routing (so the router config doesn’t need to be made accessible on the server). Actually the default stable version of FlowRouter doesn’t support server side rendering at all; for that you have to use FlowRouter SSR (until a new comibined version is created - might be coming in version 4.0).

1 Like

I suspect I tried to place routes in client side at some point, and it clearly hasn’t worked since it now resides in lib, yet I don’t have anything server related or wasn’t using imports folder.