alef-teacher-frontend

1.0.0 • Public • Published

alef-teacher-frontend

build e2e build rc rc to dev

Alef platform's module for teachers, principles and school leaders

Initial setup

Please install node manager from https://github.com/tj/n Set up the specific node version by running n auto.

Env setup

We will need some env variables that allow us to fetch internal deps.
We can set it up in two ways

  • We can make it local
export NPM_TOKEN=ask-team-member-to-get-that
export GITHUB_NPM_TOKEN=ask-team-member-to-get-that
export NEXUS_REPO_USERTOKEN=ask-team-member-to-get-that
  • We can make it global
https://unix.stackexchange.com/questions/117467/how-to-permanently-set-environmental-variables

To check if variables are saved please run

printenv

How to run?

Firstly we will need authorization middleware running in the background
Please clone it from https://github.com/AlefEducation/alef-journey-router.
Your project structure should look like

projects/
  alef-teacher-frontend/
  alef-journey-router/

Please be sure your env variables are accessible ( look in "Env setup" )
Install dependencies by running npm i then npm run generate:all in alef-teacher-frontend and npm i in alef-journey-router directories.
Run apps by npm run serve:{env} for example npm run serve:e2e also in both directories.
You should use 2 tabs in your terminal.
After all those step you can open on https://localhost:8081/teacher/

How to download latest graphql schema

  • Create k8DashToken.js file in the project root
    • This file will contain the bearer token and looks like ... module.exports.token = 'Bearer ey...
    • Get the token value in http://skooner.nprd.alefed.com/
      • Open browser console, and run below code. This will save the content of the file on your clipboard. then paste it in k8DashToken.js
          copy(`module.exports.token = 'Bearer ${localStorage.getItem('authToken')}'`)
        
  • Run command npm run download-schema:${env}

How to deploy a custom image

Please install Docker
Please be sure your env variables are accessible ( look in "Env setup" )
Run script sh ./build-docker-current.sh {prefix_tag} for example sh ./build-docker-current.sh turtles
Follow the steps from the terminal

Readme

Keywords

Package Sidebar

Install

npm i alef-teacher-frontend

Weekly Downloads

0

Version

1.0.0

License

ISC

Unpacked Size

31.5 MB

Total Files

2474

Last publish

Collaborators

  • subham_saha