The lux-frontend repo is used to develop and maintain the frontend code for Yale LUX. The frontend contains custom components and interfaces that allow users to interact with linked data in a meaningful way.
This project was bootstrapped with Create React App, using the Redux and Redux Toolkit template.
client/
contains React/Redux/TypeScript code for the Frontend single page application.server/
contains code for the nodejs app that serves LUX frontend.docker/
contains code to build the docker image
Before completing these steps, ensure that all steps in the client folder README have been completed.
Make sure the file client/.env
defines required environment variables -- see client/.env.template
.
cd client/
yarn start
The AJAX call to /env will fail, but the application will work because it will use the values from the local .env (or .env.development.local) file instead.
For further instructions on client setup, go to the client folder README.
- Before completing these steps, ensure that all steps in the client folder README have been completed.
- Build the client first by running the following commands:
cd client/
yarn build
- Make sure the file
server/.env
defines required environment variables -- seeserver/.env.template
.
cd server/
yarn install
yarn dev-prep
yarn dev
The files build-docker-image.sh, run-docker-container.sh, and config.json are created for convenience in running docker locally. They are not used in deployment to dev/tst/prd.
cd docker
./build-docker-image.sh
cd docker
cp config.json.template config.json
# Populate config.json with real parameter values
cd docker
./run-docker-container.sh
It will bring up the server at port 8080 by default.