You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a simple app that uses Flow-Router. In my public directory, there are some files that I'd like to be served. This seems to work always when running meteor without flow router. However, when I start the dev server with my route definitions, the static files are not served at all and result in a 404 no matter how many times I clear the cache and refresh. I have to edit some file to trigger a server restart before it works as expected.
Is there something I can do to debug what's going on? Serving public files is supposed to work out of the box with flow router, right?
Here's my routes.js:
import{FlowRouter}from'meteor/kadira:flow-router';import{BlazeLayout}from'meteor/kadira:blaze-layout';import'../../ui/layouts/app-body.js';import'../../ui/pages/index-page.html';
...
import'../../ui/layouts/not-found-body.html'FlowRouter.route('/',{name: 'home',action(){BlazeLayout.render('appBody',{main: 'indexPage'});},});// ...// Two more basic routes that have nothing to with /public or similar// ...FlowRouter.notFound={action(){BlazeLayout.render('notFoundBody');},};
Other info: The routes are defined similarly to the newest TODO example in /imports/startup/client/routes.js and get imported early on the client-side.
I've used Meteor 1.5 but just upgraded to 1.6-rc.5 and the issue still persists.
The text was updated successfully, but these errors were encountered:
without FlowRouter param '/:id' my public files loads correctly in template
Problem always comes up on the initial server start
Meteor -1.8; FlowRouter - 2.1
Solved. In my case the error was in relative url of static files (css/bootstrap.min.css) loaded as (/editproduct/css/bootstrap.min.css) - that was wrong. Static files should be imported by absolute url like this: <link href="/css/bootstrap.min.css" rel="stylesheet">
(Crosspost from https://forums.meteor.com/t/flow-router-public-files-dont-get-served-until-dev-server-restarts-for-the-first-time/39763)
I have a simple app that uses Flow-Router. In my public directory, there are some files that I'd like to be served. This seems to work always when running meteor without flow router. However, when I start the dev server with my route definitions, the static files are not served at all and result in a 404 no matter how many times I clear the cache and refresh. I have to edit some file to trigger a server restart before it works as expected.
Is there something I can do to debug what's going on? Serving public files is supposed to work out of the box with flow router, right?
Here's my routes.js:
Other info: The routes are defined similarly to the newest TODO example in
/imports/startup/client/routes.js
and get imported early on the client-side.I've used Meteor 1.5 but just upgraded to 1.6-rc.5 and the issue still persists.
The text was updated successfully, but these errors were encountered: