Skip to content
This repository was archived by the owner on Jul 19, 2019. It is now read-only.
This repository was archived by the owner on Jul 19, 2019. It is now read-only.

Issues at step 11 /public folder location #229

Open

Description

@yarnball

Hi,

After tutorial 11 of your tutorial, the project will only work locally. When I uploaded my project (upto step 11) to my webserver it gave a 403 error.

However, all tests before tutorial 11 worked fine.

When index.html is located on the root folder- it works fine.

I believe this is probably related to moving the index.html to /public.

Can you advise?

Activity

  1. jakeecolution commented on Sep 26, 2016

    @jakeecolution

    No the issue is when you keep <script src="/bundle.js"></script>

    You should switch it to <script src="/public/bundle.js"></script>

  2. jakeecolution commented on Sep 26, 2016

    @jakeecolution

    #242 Check out my PR.

  3. mawansui commented on Sep 27, 2016

    @mawansui

    @bryanj4 Thanks for the advice, man, worked like a charm. Note, though, that moving along with the tutorial, we:
    a) Create the public directory
    b) Move our index.html and index.css files there, as @yarnball has stated.

    Which means it seems to be better to do the following:

    1. Add the <script src="/public/bundle.js"></script> after we make a first change to the webpack.config.js
    2. Then remove the /public part right in the end of the tutorial.

    At least this is how I made it work. Hope anybody else will find this useful.

  4. smilingkylan commented on Oct 27, 2016

    @smilingkylan

    I think I fixed it by changing ~line 12 of server.js to:

    res.sendFile(path.join(__dirname, './public/index.html'))

  5. bondansebastian commented on Dec 5, 2016

    @bondansebastian

    The output path of webpack.config.js before server.js is modified should be set to root folder, otherwise bundle.js will fail to load (in README.md)

  6. merriam commented on Mar 21, 2017

    @merriam

    Also bug #218, fix #310

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions