You can use npm run commit to commit your changes in a procedural way. See below.
Before starting development, for first time setup.
Generate local SSL key & certificate. Refer this for mkcert.
mkcert localhost-
Client env variables are already present in client directory in .env.* files. You can change them manually if you need to.
-
Server env variables load from .env file at root.
npm run envFollow the CLI to generate local .env file at root of project automatically.
Create a .env file in the root of project, copy contents from .sample.env, and set the values as per your development requirements.
npm install -g create-react-app # global client initializer
npm install # server packages
npm run install:client # client packagesnpm run dev # client & server localhostBy default, Backend at port: 5000, Frontend at port: 3000
npm run servernpm run clientnpm run test:fullnpm testFor interactive testing
npm run test:clientFor automatic testing
npm run test:client:autoRefer package.json for more npm scripts.
npm run commitUse the above command to locally run unit tests, build linting & committing changes. By doing so, you'll save the time spent by remote action workflow to run tests & builds, and you won't have to revert your commit if tests fail, as this will raise any warnings or errors that occur, before commiting your changes.
-
Any commits on branch:main trigger production build, test & deployment workflows for both front & backend, depending upon code changes.
-
Any commits on branch:beta trigger beta build, test & deployment workflow, currently for frontend only (if backend side code changes are detected, the respective backend production deployment workflow also triggers from this branch). If you've made changes over this branch for frontend, then a temporary beta preview url will be displayed in the respective action workflow logs, valid for 15 days.
-
Any pull requests to branch:main triggers respective workflows for build & test.
-
It is highly recommended that
npm run commitis used to commit your contributory changes. -
Actions workflow is enabled for commits on main branch, therefore tests, builds and deploys are automated from this branch.
-
Actions workflow is enabled for pull requests for build and test.