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 sucessfully installed on your computernpm -v
andnode -v
Recommended versions to be used are: node 10.x and npm 6.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 --python=python2.7
Note Some
Node
installation dependencies do not work with Python 3.x therefore users with default higher version of Python have to specify lower Python versions.
-
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/