Setting up projects from the various React Templates
Installing dependencies
- Install
nodejsfrom their officical site - Make sure you download the version with LTS support
- ⚠️ At the time of writing this document the latest version of
nodejsis16.16.0 - The installer includes
npm - Make sure while installing
nodejs, you DO NOT INSTALL CHOCOLATEY - Once
nodejsis installed, you can close the terminal and open it again.
Checking installed dependencies
- Open a new Command Prompt and type in
node -vandnpm -v - You should see something like this in your output.
Installing yarn (Optional)
Once you have installed nodejs and npm, you can install yarn by running this command
npm install --global yarn
Note
⚠️ frontend servers are mostly run in VSCode
⚠️ backend servers are either run in Visual Code (if the template has asp.net core backend) or VSCode
Running the React Templates
Running the frontend server
- Clone the repositories from GitHub or Bitbucket as required.
- To run the
frontendserver, you first need to install thenode_modules - For doing so, open the cloned repository in VSCode.
cd frontend
npm install
# or
cd frontend
yarn
- Once the
node_modulesare installed, you can start the frontend server using the commandnpm startoryarn start. - The commands which can be executed are seen in the
scriptssection ofpackage.json
Running the backend server
- If the project has a
ASP.NET Corebackend, open Visual Studio and install thenugetpackages and run the server. - If the project has a
FastAPIbackend, create a new virtual environment using themkvirutalenvwrapper, install the packages fromrequirements.txtusing the command
pip install -r requirements.txt
# to run the server
uvicorn main:app --reload