elvis-hf/optimization
0
Developer's Guide for React frontend
Prerequisites
Install Node.js if not done yet. The following commands should run if you have it installed.
node -v
npm -vLocal Development
First go to the react frontend folder:
cd frontends/reactRun the following commands to install required packages when you run the code the first time or after you make changes to package.json.
npm installNow you should be able to start the local development server:
npm run devOpen the link printed out on the terminal. The webpage automatically reloads when files are edited.
Deploy to Hugging Face
Build the production version:
npm run buildThis generates the production build inside the dist/ directory.
Commit and push:
git add <files>
git commit
git push⚠️ Make sure the dist/ directory is included when adding to git. ⚠️ Even if you only changed the backend, you must still run npm run build when deploying or it will not update.
