Node: 16.4.1
It is highly recommended to use nvm to manage your node versions.
nvm install 16.4.1
After installing the node version you should also install the yarn package manager using npm.
npm install --global yarn
Yarn is a package manager as well as npm that addresses security and performance shortcomings from npm.
After installing yarn we can install all the required packages
(defined in package.json
and locked in yarn.lock
).
yarn install
All envs have to be setup in a .env.development
file for dev
environment and .env.test
file for testing environment.
The primary env variable is REACT_APP_API_URL
for the api variable.
In the project directory, you can run:
Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.
The page will reload if you make edits.
You will also see any lint errors in the console.
Launches the test runner in the interactive watch mode.
See the section about running tests for more information.
Runs the linter (eslint in this case) and warns for all offenses through the command line.
Builds the app for production to the build
folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.
Your app is ready to be deployed!
See the section about deployment for more information.
Guidelines for style and format of code should be followed to ensure readability as well as productivity.
The source code uses typescript for typechecking. For formatting we use prettier and for code style eslint, following [https://github.com/airbnb/javascript](airbnb's style guide for js).
For deployment we will use Heroku Buildpack for create-react-app. This will take care of all dependencies for build processes done at heroku.
You can learn more in the Create React App documentation.
To learn React, check out the React documentation.