These are chat archives for jescalan/roots

21st
Jul 2015
Henry Snopek
@hhsnopek
Jul 21 2015 01:20
@nishtacular in your app.coffee do you specify
server:
    clean_urls: true
Nishant Menon
@nishtacular
Jul 21 2015 01:21
Hey @hhsnopek yep :)
it just seems like roots is looking for the actual .jade file for the route initially navigated too.
Henry Snopek
@hhsnopek
Jul 21 2015 01:32
so clean_urls will remove the hashbang, you might have to do localhost:1111#about/me or something similar
Nishant Menon
@nishtacular
Jul 21 2015 01:35
oh ok. so this is not an option with clean urls. Was really hoping to use page.js option for parameters etc.
Henry Snopek
@hhsnopek
Jul 21 2015 01:35
it is an option
but automatically it looks for the folder path
rather than going directly to localhost:1111/users/tony navigate to it through your site
that will always work
also you must have the route within page.js while navigating through
if page isn't working I've done a lot of projects with Marionette, which is based off backbone, you could just use Backbone.Routerinstead of page.js
Nishant Menon
@nishtacular
Jul 21 2015 01:39
ok. well the issue is that the link is dynamically generated for example localhost:1111/win/12345 or localhost:1111/win/32342
So the users receive these links directly, and if they click on them they'll encounter the error. I might have to consider alternative approaches. :worried:
Henry Snopek
@hhsnopek
Jul 21 2015 01:40
it'll work once deployed as a static site, but it's hard locally working with them
if you're using netlify or github pages it'll work
well github pages will keep the hash within the url
try localhost:1111#win/12345
should convert it to the correct url and direct you via page.js
Nishant Menon
@nishtacular
Jul 21 2015 01:44
oh right. ok will test and get back with update. Thanks for the input. Much appreciated.
Henry Snopek
@hhsnopek
Jul 21 2015 01:45
:thumbsup:
Robert Bak
@robertbak
Jul 21 2015 15:20
Hey, quick question - does anyone know if there is a way to get the file url (dir/filename) that's currently being generated in jade?
Mathias Biilmann
@biilmann
Jul 21 2015 18:07
@nishtacular if those
@nishtacular if those urls are dynamically generated client-side and you’re using history push state, then you’ll want to make sure your server can respond with a generic index.html for all of those pages