addyosmani / addyosmani/backbone-fundamentals
Bug with directory location in the server.js file in the Book Library app
- 主要言語
- Rich Text Format
- スター
- 9.2k
- フォーク
- 1.4k
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
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 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
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
評価
この issue はまだ評価されていません。