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

Serverside rendering doesn't function when requesting index.html #60

@daan-nguyen

Description

@daan-nguyen

It appears when making a request to the root entry (localhost:1337/ or localhost:1337/index.html) the server side rendering doesn't initiate.

I think it's this part here in the app.js. The static file serving is finding the index.html first, so it skips the code that will provide server side rendering. Hitting the /about route directly seems to work correctly as the file doesn't resolve on static file serving.

app.use(express.static(__dirname + '/public'));

app.use((req, res) => { ...

You can verify this by just deleting or renaming the index.html file in server/public.

PS. Great boilerplate project! We are evaluating a few atm and this one is definitely our favourite, esp like the generators. The recent sans-apollo branch has been really helpful since we aren't in a position to make use of it.

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