plouc / mozaik-demo

Sample mozaïk app with two dashboards
http://mozaik.rocks/
103 stars 75 forks source link

Yarn start does not run the API, causing an error after the client loads. #23

Closed smithandrewl closed 5 years ago

smithandrewl commented 5 years ago
item info notes
node version v8.16.0
npm version 6.9.0
mozaik-demo version 2.0.0
browser All (not a client issue)

Expected behavior

yarn start should start the back-end and the front-end, and open the site in a browser. Editing and then saving changes should cause the client to update, without having to run yarn build or node server.js.

Actual behavior

yarn start starts the client, which cannot connect to the back-end API since it is not running. The client loads in the browser with the message An error occurred while fetching configuration: Unable to fetch configuration: Internal Server Error (500).

To see changes, you must run yarn build followed by node server.js

Steps to reproduce

  1. Clone the repository
  2. git checkout mozaik-2
  3. yarn install
  4. yarn build
  5. yarn start
plouc commented 5 years ago

yarn start doesn't starts the server, you'll have to launch it in a separate session. Create React App clears the output, so it's not recommended to load both using the same command because you won't have any logs.

plouc commented 5 years ago

You could also use the main's repo demo folder as it's more up-to-date than this one.

smithandrewl commented 5 years ago

Thanks for getting back so quickly. I made this issue for the "fix" I made for this. I just submitted it as a pull request.

plouc commented 5 years ago

No pb :) I'm just concerned about the output.