This program is the backend API that integrates all of the data processed in CEC-DATAPREP with FRCS, TEA and LCA models.
The API can be called directly, but more commonly is used for the backend to the CECDSS Web Application.
- Make sure you are using node v14
npm install
the dependencies. (You may have tonpm rebuild
if you are having problems with osrm bindings)
The following environmental variables must be set:
DB_HOST=xyz DB_USER=xyz DB_PASS=xyz DB_NAME=xyz DB_PORT=xyz
We recommend you create a file in the project root called .env
and then specify the configuration variables within that file.
Routing information for california must be available to this program. You can create an OSRM extract yourself by following the guides at the official OSRM website. We also provide a custom OSRM extract which is available at (TBD - coming soon).
Create a folder called data
in the project root and extract the OSRM files within it.
At this point you are ready to run the cecdss-backend
Type npm run dev
to launch the app at https://localhost:3000.
The front-end companion application at https://github.com/ucdavis/cecdss will now be able to connect to the backend and you are ready to start making requests.
TODO API Documentation