You will need pnpm
. Refer to the Getting started documentation for developers to install it using volta
- Install the dependencies
pnpm i
- Start the development server with
pnpm dev
For reference, here are all the environment variables that you can use to override the behavior of the app. In development none of them should be required. But some checks might require them.
# .env.development
VITE_VERSION=local
VITE_PORT=3114
VITE_GRAASP_API_HOST=http://localhost:3000
VITE_SHOW_NOTIFICATIONS=true
VITE_UMAMI_WEBSITE_ID=<the id of your umami project>
VITE_UMAMI_HOST=http://localhost:8000
VITE_SENTRY_ENV= # some value
VITE_SENTRY_DSN= # some value
VITE_RECAPTCHA_SITE_KEY= # some value
VITE_GRAASP_H5P_INTEGRATION_URL= # the origin for the h5p integration
VITE_GRAASP_REDIRECTION_HOST=http://localhost:3114/redirect
If you do not need to actively develop the project you can run it in preview mode. This mode runs the app from the static build and uses a lot less RAM compared to running in development mode.
-
You need to have a
.env.production
file with the following content:VITE_GRAASP_H5P_INTEGRATION_URL=http://localhost:3000/items/h5p-assets/ VITE_GRAASP_REDIRECTION_HOST=http://localhost:3114/redirect
-
Build the project
pnpm build
-
Preview the project
pnpm preview
-
Open the app running on: http://localhost:3114
# .env.test
VITE_VERSION=local
VITE_PORT=3333
VITE_GRAASP_API_HOST=http://localhost:3636
VITE_SHOW_NOTIFICATIONS=true
VITE_GRAASP_ANALYZER_HOST=http://localhost:3005