- Run
yarn
to install the dependencies. - Run the API at
localhost:3000
- Set the following environnement variables in
.env.local
REACT_APP_API_HOST=http://localhost:3000
PORT=3111
REACT_APP_SHOW_NOTIFICATIONS=true
REACT_APP_AUTHENTICATION_HOST=http://localhost:3001
REACT_APP_H5P_INTEGRATION_URL=
REACT_APP_VERSION=latest
- Run
yarn start
. The client should be accessible atlocalhost:3111
The first requirement for fully accessing the client is to be authenticated. If not, the client will redirect to the authentication page. You have two possibilities to authenticate:
- Set up and run the
graasp-auth
repository. You may need to adapt your configuration to match the hosts. - Use Postman or anything similar to authenticate. Send to the API either
POST <API_HOST>/register
withname
andemail
orPOST <API_HOST>/login
with your registeredemail
. Once authenticated, you should receive a link to receive your cookie. Refer to the API for more details.
You are successfully authenticated if you can access to the client without being redirected.
Set the following environnement variables in .env.test
REACT_APP_API_HOST=http://localhost:3000
PORT=3111
REACT_APP_SHOW_NOTIFICATIONS=false
REACT_APP_NODE_ENV=test
REACT_APP_H5P_INTEGRATION_URL=
REACT_APP_VERSION=latest
Run yarn cypress
. This should run every tests headlessly.
You can run yarn cypress:open
to access the framework and visually display the tests' processes.
While developing you can run yarn check
to perform prettier formatting checks, type checks and eslint rule checking.
Kim Lan Phan Hoang 💻 |
Alexandre Chau 💻 |
Basile Spaenlehauer 💻 |