phetsims/rosetta

Add dev script for Rosetta

Closed this issue · 1 comments

Since Rosetta uses React for the front end, it would be nice to have hot module reloads, React dev tools (via browser extension), and all of the other goodies you get from using a dev server for the React app.

However, Rosetta is configured in an interesting way. The back end and API is a Node/Express app. The back end serves the front end, and it provides the API for the front end. So when we start Rosetta, we build it for production, then use the Node app to serve the static assets (HTML/CSS/JS) output by the front end build process. The Node app also provides the API for the front end. (Normally, I think these three components would be split into different projects, but we wanted to house Rosetta in one repository.)

I think a dev server requires its own port, so the dev script will need to serve the front end on port A, and the back end on port B.

Another improvement would be to use nodemon, a Node library that reloads the server when changes are detected in server modules.

I think as of 86d83aa, this is done. Closing.