Skip to content
This repository has been archived by the owner on Mar 28, 2024. It is now read-only.

Latest commit

 

History

History
41 lines (30 loc) · 1.27 KB

DEVELOPER_NOTES.md

File metadata and controls

41 lines (30 loc) · 1.27 KB

This document is supposed to contain some helpful notes for developers

Frontend: Ensure development and production builds look the same!

Due to reasons unknown, the production build – which is minified using webpack – may sometimes put load the CSS files in a different order than the development build, causing the frontend app to look different between development and production (see e.g. this issue). Therefore, it is essential to always check both, development and production build, before submitting and merging a change.

The production build is created via

npm run build

Now, typically we deliver this build via the Flask backend. But there is also an easier way to quickly achieve the same thing (which then also avoids running into Flask configuration errors): We can simply use serve. It needs to be installed once, globally:

npm install -g serve

Then, from the pyqmix_frontend directory, simply invoke

serve build/

and you're ready to view the app in the browser.

Backend: Run without pumps

It's possible to bring up the Flask backend even when no pump system is connected to the computer. To do so, set the environment variable PYQMIX_TEST_MODE to 1 or True before starting Flask.