Closed brio50 closed 1 year ago
package.json
for DevelopmentI think I can add venv/Scripts/flask --app divisor run --debug
to one of pacakge.json
's fields. Maybe npm run build
is cached, and can be combined with some other scripts
stage to compile javascript then start the flask server for local development.
https://github.com/brio50/divisor/commit/cf302f034b6cbf97d1f24278f339e08631ac31d2 seriously improved this project. See CONTRIBUTING.md
to learn how deployment works, as well as testings. https://github.com/facebook/create-react-app/ made my life so much easier, even testing is better now - one command for compile and web server refresh!
Production
The
npm
command I use to build executeswebpack
in developer mode. The deployed website, https://divisor.onrender.com/, loads slowly on my phone. Use official guidance to convert to production mode. I'm not going to install another plugin, thewebpack
command can take a command line argument, i.e.mode=production
I think this will "minify" css and js in the project, hopefully speeding up loading time.