Questionset Editor Setup
Fork repo - https://github.com/Sunbird-inQuiry/editor
git clone git@github.com:rajnishdargan/editor.git
cd editor
git remote add upstream git@github.com:Sunbird-inQuiry/editor.git
git remote -v
git fetch upstream
git checkout -b release-8.0.0 upstream/release-8.0.0
git fetch upstream
git merge upstream/release-8.0.0
You got the latest code of release-8.0.0 by following above steps
Check node version
node -v
Use node 18.19.1 or latest of 18
Install dependencies
npm i // root folder
Â
Open three terminals
Terminal1 (Build the library)
Terminal2 (Run Demo app) - Once the terminal 1 execution complete then run the terminal2
Terminal3
or
Â
Set the Base URL and API Key in .env file
If .env file is not present create a .env file and add the API key and Base Url as
Change the questionset identifier in data.ts file to launch diffrent questionset.
https://github.com/Sunbird-inQuiry/editor/blob/release-8.0.0/src/app/data.ts#L12
Go to http://localhost:4200/
It will launch the Demo app
To launch Practise Questionset click on Quetsion Set Editor
Note - The type of Primary category or the editor get stored in localstorage to Launch the editor as per another Primary category config clear the localstore manually then Click on The flow as per need.
Questionset Editor (inQuiry default flow used in ED)
Question Editor ( Samagra use case VDN - change the config in data.ts file and Base_URL + API_KEY in .env file)
Survey , Observation, Rubrics (Sikhalokam Flow - VDN Dev)
Once you click on Question Set Editor it will launch the editor locally
For any proxy related changes make necessary changes in proxy.config.json
and server.js
file.
Â
After all the Testing Related to Editor is completed build the web component and change the package version
Change the version in editor/projects/questionset-editor-library/package.json
for angular library.
Change the version in editor/web-component/package.json
for web component.
Â
Dev Debug Help
Mock API’s by modifying server.js (note this require code changes and you need to be careful while pushing the changes in PR)
Update the server.js file as per the need of proxing the API’s locally
Here is one of the sample that can be used
Unzip mock-api folder in root folder
run the node server.js
again after making any changes in server.js