Development
We have provided both the Development and Staging support for this application.
Make sure you have
Node (https://nodejs.org/dist/latest-v8.x/)
NPM (https://docs.npmjs.com/)
&
Yarn (https://yarnpkg.com/en/docs/install)
installed in your system.
Initially Run the below command to install the dependencies:
i) yarn
Development Mode:
Just run the below command to run this application in the development mode, most of the time you will work on the development mode to develop or customize this application.
To Run The Frontend:
yarn web
To Run GraphQL Api:
yarn server
Staging Mode:
Staging mode is used to check if everything is alright before you push it to the production server or deployment. Here are the command needed to run this application in Staging mode,
i) yarn web:staging
ii) yarn server:build
iii) yarn serve
This application is built on top of monorepo architecture check more on this in the Deployment section. you can find all the above command that we discussed here in the root package.json file scripts section.
Important Notes:
Make sure all the dependency you have in your packages/web/package.json
file also need to be available in packages/server/package.json
file. This is necessary because server package converted to cloud package which is eventually deployed to firebase so packages/server/package.json
file is same as packages/cloud/package.json
. In the cloud directory there is next directory which is copied from the packages/web/.next directory. so this is your next build folder.
So, if something is wrong, there might be some package missing in your server/package.json file which is available on your web package.json file.
Also, every time you change some package or update something or deployed the project it's better to remove the packages/web/.next directory and build the web again.