- Download nvm-setup.exe (link).
- Install nvm, and you have two options:
- Install it directly on your disk (C:/)
- Install it as a user
- During the installation, you might be prompted that a Node version already exists, and whether npm should maintain it. Press yes in this case.
- Open a terminal.
- If
nvm
is not recognized in VS Code, then open a regular PowerShell / Bash terminal.
- If
- Install Node version 19.2.0 using:
nvm install 19.2.0
(not tested for other versions as of now).- If
nvm
is still not recognized, and you've installednvm
as a user,
then open a terminal as an administrator from your C:/ directory and execute the command there.
- If
- Run
npm install
in your repository. - Run
npm run setup-local-windows
in your repository.
- Ensure that virtualization is enabled in your BIOS.
- Install Docker Desktop on your computer (link).
- Run
docker compose build
in your repository. - Run
docker compose up
in your repository.
When making changes in any of the Docker files, use npm run force-build:docker
.
- Download and install nvm using
sudo apt-get install nvm
+sudo apt update
(or an alternative for your distro). - Open a terminal.
- Install Node version 19.2.0 using:
nvm install 19.2.0
. - Run
npm install
in your repository. - Run
npm run setup-local-linux
in your repository.
- Ensure that virtualization is enabled in your BIOS.
- Install Docker Desktop on your computer / or install Docker via the CLI.
- Run
docker compose build
in your repository. - Run
docker compose up
in your repository.
When making changes in any of the Docker files, use npm run force-build:docker
.
If Husky isn't working when committing and pushing, try the following:
- Create a new config file in your home folder using:
touch ~/.huskyrc
. - Open the file with nano/vim/code (e.g.,
nano ~/.huskyrc
). - Paste the following into the file:
# ~/.huskyrc # This loads nvm.sh and sets the correct PATH before running the hook export NVM_DIR="$HOME/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
During your unit test development, you can run npm run test:local
.
This command runs your unit tests and then generates a code coverage report for you.
This report automatically opens in your browser and provides insights into your unit test outcomes.
If you want to use local environment variables, you can add them to the start:local
script
found in the package.json
.
For using environment variables in Docker, add them to your Dockerfile
.
On AWS, we use the parameter store (more explanation will follow at a later point).
You also need to add the environment variables to jest.setup.ts
if you need them during
your unit tests. Also, expand the environment.variables.test.ts
test accordingly.
Renovate automatically keeps track of package updates and creates pull requests for them. To add the Renovate bot to your project, go to the installations section under your profile settings and click configure next to Renovate. Scroll down, then select your repository under select repositories, and finally, click save.
Install the Prettier ESLint plugin and create a .vscode folder with a settings.json containing:
{
"editor.defaultFormatter": "rvest.vs-code-prettier-eslint",
"editor.formatOnPaste": false, // required
"editor.formatOnType": false, // required
"editor.formatOnSave": true, // optional
"editor.formatOnSaveMode": "file", // required to format on save
"files.autoSave": "onFocusChange",
"files.eol": "\n" // optional but recommended
}
You can adjust the settings according to your preferences.
- Markdown Preview Enhanced
- Docker
- Dev Containers
- Material Icons for GitHub