Skip to main content

SETUP and INSTALL

To Install the project and build all packages

yarn bootstrap

To clean install the project of already installed.

If you need to do a clean the existing node_modules and take latest changes from the remote head

yarn clean:install

LINTING

To check linting

yarn lint <relative folder>

To check and auto fix linting

yarn format <relative folder>

PACKAGES COMMANDS

To run build all packages

yarn build

To run all packages in watch mode

yarn watch

Note: It only run packages and packages-modules only in watch mode. Servers should be run separately.

Also check out yarn watch-packages to run watch on required packages.

To run build with watch for dependent packages

For auto reloading changes into the server to be productive during development.

yarn watch-packages

If you also need to watch along with it, you can as many scopes as required like below.

yarn watch-packages -- --scope="@sample-stack/counter-module*" --scope="@packageb"

TO START SERVERS

To run an individual package in watch mode

lerna exec --scope="<package name>" yarn watch

More details on how to use lerna exec

To run any command on a package <package_name>

lerna exec --scope="<package_name>" <command>

How to Start Backend and Frontend separately

To start the frontend-server

lerna exec --scope="*frontend-server" yarn watch

To just start the backend-server

lerna exec --scope="*backend-server" yarn watch

To run both Frontend and Backend Server

yarn start

To run both Frontend and Backend Server but start frontend in SSR Mode

yarn start:envSSR

To run Frontend with production build in development

Build the package

lerna exec --scope="*frontend-server" yarn build

Start the server with dev environment file

lerna exec --scope="*frontend-server" yarn start:dev

Make sure backend is also running in separate terminal

lerna exec --scope="*backend-server" yarn watch

Start Mobile application

Before starting mobile expo, make sure to start the backend server of the web application first.

lerna exec --scope="*backend-server" yarn watch

And then start mobile expo application.

lerna exec --scope="*mobile-device" yarn watch

Start Desktop application

Before starting the desktop application, make sure to start the backend server of the web application first.

lerna exec --scope="*backend-server" yarn watch

And then start the desktop application.

lerna exec --scope="*desktop" yarn watch