A web-based analysis tool to assist farmers, academics and policymakers with understanding programs and policies surrounding the farm bill
farmdoc is a React module that renders the front end of the Farmdoc dashboard, exchange calls and data with the model backend.
-
Check that required JavaScript package manager
npm
andNode.js
package are successfully installed on your computernpm -v
andnode -v
Recommended versions to be used are: Node.js 22.x+
-
If not download
Node.js
package from, for example nodejs.org and install it on your system. Package managernpm
is distributed withNode.js
and it is automatically installed on your computer. -
Clone the code from Farmdoc git repository.
-
In the Project window terminal run
npm install
Note The project has been updated to use modern
sass
instead ofnode-sass
, eliminating Python dependencies. Now the project is fully compatible with Python 3.If you encounter peer dependency conflicts, you may need to use
npm install --legacy-peer-deps
.
-
In the Project window terminal run
npm start
-
The dashboard should open locally at
http://localhost:3000/
-
Follow the login instructions (using your
Datawolf
credentials)
Launches the test runner in the interactive watch mode.
Builds the app for production to the build
folder.
It bundles React in production mode and optimizes the build for the best performance.
Copy the build folder to a web server to run the app
docker build --no-cache --build-arg REACT_APP_ENV=development --progress=plain --tag farmdoc/frontend .
REACT_APP_ENV can be localhost, development or production
This should run the application on http://localhost:3000/