Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deployed app shows iron:router welcome screen, local app works fine #43

Closed
dandv opened this issue Apr 28, 2015 · 10 comments
Closed

Deployed app shows iron:router welcome screen, local app works fine #43

dandv opened this issue Apr 28, 2015 · 10 comments
Labels
Milestone

Comments

@dandv
Copy link
Contributor

dandv commented Apr 28, 2015

Reproduction repo: https://github.com/dandv/webix-restivus
Demo: http://webix-restivus.meteor.com/

The bug summary is the naive observation. Looking at the console shows a Reference error "Route is not defined" at nimble-restivus.js line 124:

route = new Route(this, path, options, methods);

When deployed with --debug, the deployed app also continues to run, and shows the grid, just as the locally run app does. BTW, should --debug cause this difference? CC @stubailo.

This is ultimately caused by Restivus.addCollection being called on the client via lib.

@stubailo
Copy link
Contributor

Should be fixed by #41

@kahmali
Copy link
Owner

kahmali commented Apr 28, 2015

Absolutely, @stubailo. I'm reviewing #41 now and it looks good so far (I'll post all this and more on the actual pull request later today). I just have an exam I need to cram for until Wednesday, so I may not be able to finish reviewing it until then. Sorry for the hold up on this! I look forward to getting rid of all these iron:router issues once and for all.

@stubailo
Copy link
Contributor

No problem, @kahmali! Take as much time as you need.

@kahmali kahmali added the bug label Apr 29, 2015
@kahmali kahmali modified the milestone: v0.7.0 May 2, 2015
@kahmali
Copy link
Owner

kahmali commented May 2, 2015

This is resolved by #46. Thanks so much for reporting it!

@kahmali kahmali closed this as completed May 2, 2015
@renewsoqv
Copy link

Im receiving the same error on the file nimble_restivus.js:124 Uncaught ReferenceError: Route is not defined

@kahmali
Copy link
Owner

kahmali commented May 13, 2015

@renewsoqv There's no reason to configure or define routes on the client. Just do everything on the server and you should be fine. I'll be sure to only export Restivus on the server and make that very clear in the next update.

If you're not using Iron Router on the client, then you'll have to wait until v0.7.0 is published (or clone an early build from the 0.7.0 branch).

@renewsoqv
Copy link

@kahmali My config is as:

Restivus.configure
  useAuth: true
  prettyJson: true
  useClientRouter: false
  onLoggedIn: -> console.log "#{@user.email} (#{@userId}) logged in on api"
  onLoggedOut: -> console.log "#{@user.email} (#{@userId}) logged out on api"

On the common folder, i used it there following the instructions on docs. Should i move it to a server folder?

@kahmali
Copy link
Owner

kahmali commented May 13, 2015

@renewsoqv See #65 (specifically, this response). The short answer is yes. Config should happen on server.

@renewsoqv
Copy link

@kahmali Thanks, placing the config on the server folder solved my issue, plus the reading of #65 really clarify everything.

@kahmali
Copy link
Owner

kahmali commented May 13, 2015

Sorry for leaving the docs out of sync once that bug was discovered! I should have removed that information. I've created a new issue and I'll fix it in the next update (0.6.6).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants