It consists of a React frontend and a Rust backend.
Execute the following in ./frontend
:
npm install
npm start
By default, this frontend will use the hosted development backend at https://greenhouse-backend-dev.fly.io
.
You can also host your own local backend as described in the next section.
Then create the file .env.development.local
with these contents:
REACT_APP_BACKEND_HOST=http://localhost:8080
If you just want to run a local backend server, use Docker to build a container:
docker build -t my-backend .
docker run my-backend
Alternatively you can directly run the Rust app with cargo run
.
If you want to start a local server for displaying the frontend consider the following steps:
docker build -t automated_greenhouse_frontend ./frontend
docker run -it -it -p 8000:8000 automated_greenhouse_frontend
These commands will start a server locally which can be accessed via http://localhost:8000.
Alternatively, you can also run the following commands to enter the developer preview:
npm run dev
However, there might be issues with displaying images.