tmeasday / meteor-router

MIT License
366 stars 76 forks source link

server router with meteor 0.6.5 #123

Closed shaltas closed 11 years ago

shaltas commented 11 years ago

I think server side routing stopped working since 0.6.5.

Here is some text from v0.6.5 change log

  • Move HTTP serving out of core Meteor into the webapp package. This allows building Meteor apps that are not web servers (eg. command line tools, DDP clients, etc.). Connect middlewares can now be registered on the new WebApp.connectHooks instead of the old __meteor_bootstrap__.app

Simply adding server side routing would crash the app with the following error

W20130812-18:16:52.954(0)? (STDERR) Error: Cannot find module 'connect'
W20130812-18:16:52.954(0)? (STDERR)     at Function.Module._resolveFilename (module.js:338:15)
W20130812-18:16:52.955(0)? (STDERR)     at Function.Module._load (module.js:280:25)
W20130812-18:16:52.955(0)? (STDERR)     at Module.require (module.js:362:17)
W20130812-18:16:52.955(0)? (STDERR)     at require (module.js:378:17)
W20130812-18:16:52.956(0)? (STDERR)     at Object._.each.Npm.require (/home/vagrant/devel/proj/.meteor/local/build/programs/server/boot.js:86:18)
W20130812-18:16:52.956(0)? (STDERR)     at Router._start (packages/router/lib/router_server.js:70)
W20130812-18:16:52.956(0)? (STDERR)     at Router.add (packages/router/lib/router_server.js:14)
W20130812-18:16:52.957(0)? (STDERR)     at app/server/router.js:3:16
W20130812-18:16:52.959(0)? (STDERR)     at app/server/router.js:33:3
W20130812-18:16:52.959(0)? (STDERR)     at mains (/home/vagrant/devel/proj/.meteor/local/build/programs/server/boot.js:153:10)
tmeasday commented 11 years ago

Hi, yes, I haven't brought the router up to 0.6.5 yet. Will happily accept a PR.

tmeasday commented 11 years ago

Fixed in 0.5.4