npm install
All environment variables for react application must start with APP_
prefix
To change env prefix change add or remove string from envPrefix
variable in vite.config.json
Environtment variables can be accesed using env.<name>
or import.meta.env.<name>
. Prefix must be included.
Declare env types in src/env.d.ts
in ImportMetaEnv
interface
The environment variables can be found and modified in the .env
file. They come with these default values:
# Port number (optional, default: 3000)
PORT=3000
# Open browser on start (optional, default: true) if value is other than "true" it will be read as false
OPEN_BROWSER=true
In the project directory, you can run:
Start development build
npm start
build for production.
npm run build
Preview production build
npm run preview
Removes all the files generated by the build process.
npm run clean
Finds errors in your code.
npm run lint:check
Fixes linting errors.
npm run lint:fix
Fix the code formatting.
npm run prettier:fix
Check the code formatting.
npm run prettier:check
tsconfig.json
is for react app typescript configurationtsconfig.node.json
is for vite and other development tools typescript configuration that will not be included in build result- If you want to disable
pre-commit
orpre-push
git hook you can remove the hook inside.husky
directory - If you want to disable dependabot you need to remove
.github/dependabot.yml
- If you want to disable codeql analysis you need to remove
.github/workflows/codeql-analysis.yml