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
This is my first issue on GitHub, I hope I'm doing this right, but let me know if I need to make a pull request for this. I would be happy to. Thank you for the Backbone Application book. It's been great to work through so far, and I appreciate your thorough explanations.
Ok, when I typed out your code for the server.js file in my application, I got an error in the window: Cannot GET / . Also in the dev tools, http://localhost:4711/ returns a 404 Not Found.
I think the issue is with the line of code in server.js: app.use( express.static( path.join( application_root,'../', 'site') ) );
This moves the reference out of the root folder, as I understand it. When I took out the two .., the app displays fine, so now, my line of code looks like: app.use( express.static( path.join( application_root,'/', 'site') ) );
This is assuming that the server.js file is running in the root at the same level as the node_modules and site directories, which is what I understood from your directions.
I think I'm supposed to submit a PR for this, which will also be my first. Please let me know if I'm getting this right, or what you would like me to do from here.
Again, thanks!
Nate
The text was updated successfully, but these errors were encountered:
I was running into this same issue too and your fix worked for me. I'd recommend submitting a PR since it is such a simple fix, it shouldn't be an issue merging it. Then again I'm not the repo owner so maybe Addy would prefer just making the change himself.
Hello Addy.
This is my first issue on GitHub, I hope I'm doing this right, but let me know if I need to make a pull request for this. I would be happy to. Thank you for the Backbone Application book. It's been great to work through so far, and I appreciate your thorough explanations.
Ok, when I typed out your code for the
server.js
file in my application, I got an error in the window:Cannot GET /
. Also in the dev tools,http://localhost:4711/
returns a404 Not Found
.I think the issue is with the line of code in
server.js
:app.use( express.static( path.join( application_root,'../', 'site') ) );
This moves the reference out of the root folder, as I understand it. When I took out the two
..
, the app displays fine, so now, my line of code looks like:app.use( express.static( path.join( application_root,'/', 'site') ) );
This is assuming that the
server.js
file is running in the root at the same level as thenode_modules
andsite
directories, which is what I understood from your directions.I think I'm supposed to submit a PR for this, which will also be my first. Please let me know if I'm getting this right, or what you would like me to do from here.
Again, thanks!
Nate
The text was updated successfully, but these errors were encountered: