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

Conversation

@Grimmstar
Copy link

In reference to the many issues being brought up by people who were not able to get the site to start up correctly, and were brought to a folder simply listing the files, I found that this solution worked for me. By modifying "backend/server.js" and "frontend/state.js", the site now loads as intended.

In "backend/server.js"

server.on("listening", () => logger.info("Listening on port " + process.env.HTTP_PORT))
server.listen(process.env.HTTP_PORT);

should be (port number should be whatever port user is intending to use)

server.on("listening", () => logger.info("Listening on port " + process.env.HTTP_PORT || 3000))
server.listen(process.env.HTTP_PORT || 3000);

and in "frontend/state.js"

window._state = new Baobab(
  {
    url: {
      route: undefined,
      path: undefined,
      params: {},
      query: {},
    },

should instead be

window._state = new Baobab(
  {
    url: {
      route: '/public',
      path: 'http://localhost:3000/public/',
      params: {},
      query: {},
    },

By modifying "backend/server.js" and "frontend/state.js", the site now loads correctly.

In "backend/server.js"
...
server.on("listening", () => logger.info("Listening on port " + process.env.HTTP_PORT))
server.listen(process.env.HTTP_PORT);
...
should be (port number should be whatever port user is intending to use)
...
server.on("listening", () => logger.info("Listening on port " + process.env.HTTP_PORT || 3000))
server.listen(process.env.HTTP_PORT || 3000);
...

and in "frontend/state.js"
...
window._state = new Baobab(
  {
    url: {
      route: undefined,
      path: undefined,
      params: {},
      query: {},
    },
...
should instead be
...
window._state = new Baobab(
  {
    url: {
      route: '/public',
      path: 'http://localhost:3000/public/',
      params: {},
      query: {},
    },
...
@ivan-kleshnin
Copy link
Member

ivan-kleshnin commented Dec 6, 2018

Hello @grimm-child. Thank you for this PR!

The changes you propose seem reasonable to me. But I'm confused that in the comment above you're mentioning changes to backend/server.js while in the list of changed files there is an entirely new file frontend/server.js (different folders!). Something is off here.

I'm going to revive this project, so I'd like to accept your PR. Just need a clarification on the above.

@ivan-kleshnin
Copy link
Member

ivan-kleshnin commented Dec 14, 2018

Hey @grimm-child did you miss a notification bell ?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants