Skip to main content

Getting Started

Requirements πŸ“œβ€‹

  • Your machine should have Yarn or Npm installed.

Note: Preferable versions

Version
node16
npm6
yarn1.16
lerna4
  • Check the node and npm version by running following commands.
node -v
npm -v
  • Install lerna globally by running following command.
npm i lerna -g
  • Install yarn
npm i yarn -g

Installation Steps πŸšΆβ€β™‚οΈβ€‹

1. Fork it πŸ΄β€‹

You can get your own fork/copy of Frontend by using the Fork button.

Fork Repo

2. Clone it πŸ‘₯​

You need to clone (download) it to a local machine using

git clone https://github.com/Your_Username/frontend-modulefederation.git

This makes a local copy of the repository in your machine.

Clone Repo

Once you have cloned the frontend-modulefederation repository in GitHub, move to that folder first using the change directory command.

This will change directory to a folder

cd frontend-modulefederation

cd repo

Move to this folder for all other commands.

3. Set it up ⬆️​

Run the following commands to see that your local copy has a reference to your forked remote repository in GitHub :octocat:

git remote -v

By running the above command, you can see that the local copy has a reference to the forked remote repository in GitHub.

origin  https://github.com/Your_Username/frontend-modulefederation.git (fetch)
origin https://github.com/Your_Username/frontend-modulefederation.git (push)

set up repo

4. Run it πŸβ€‹

  • Install dependencies
yarn install
  • Build @shiksha/common-lib
lerna run build --scope=@shiksha/common-lib
  • Run frontend application in dev environment
yarn start

Browse - http://localhost:4000

  • Run standalone module in dev environment
lerna run  start --scope=[module-name]
// e.g. to run attendance module
lerna run start --scope=attendance

Browse - http://localhost:[module port number]