DailyDesk
This project contains the frontend application for DailyDesk.
Prerequisites
It is recommended to use Node.js v16 for this project.
To manage multiple Node.js versions, we recommend using a version manager:
- macOS/Linux: nvm
- Windows: nvm-windows
Environment Setup
This project requires environment variables to be set.
-
Run the setup script to create your
.envfile:npm run setup:envNote: This script will copy the example file and attempt to look up AWS values if they are defined in
.env.example. -
Open the
.envfile and configure any remaining variables. For local development, you can use the following values:
NX_API_URL=http://localhost:4000
NX_MAIN_APP_URL=http://localhost:4200
Installation
Install the project dependencies by running:
npm install
Running the Application for Local Development
Recommended Method
To run all applications (Frontend, Tablet, and Online Booking) simultaneously in development mode, use the following command:
npm run start-all
Once started, you can access the applications at the following URLs:
- Frontend: http://localhost:4200/
- Tablet: http://localhost:4300/
- Online Booking: http://localhost:4400/
Secondary Options
If you only need to run a specific application, you can use the individual start scripts:
- Frontend:
npm start(Runs on port 4200) - Tablet:
npm run start-tablet(Runs on port 4300) - Online Booking:
npm run start-booking(Runs on port 4400)
Running Unit Tests
Run the following command to execute the unit tests via Jest:
npm test
Linting
To lint the frontend application:
npm run lint
Understand your workspace
Run nx graph to see a diagram of the dependencies of your projects.
Further help
Visit the Nx Documentation to learn more.