Setting up git

To set up git and create an access token for GitHub, suggested installing GitHub Desktop before.

Development Environment

Node & NVM

To easily manage multiple node versions you can use NVM for Windows a (Node Version Manager alternative for Windows).

Download the .exe installation file for NVM for Windows here.

After installing NVM for Windows, check that the installation is successfull and added to path by running nvm -v on a terminal.

After installing NVM, if you get nvm: command not found or see no feedback from your terminal after you type nvm -v, simply close your current terminal, open a new terminal, and try verifying again.

Once nvm is installed and working you can install any version of Node using the syntax nvm install vX.Y.Z and to switch to a node version, run nvm use vX.Y.Z. Novu requires node v20.8.1 or higher:

nvm install v18.17.0
nvm use v18.17.0

PNPM

For package management, we use PNPM instead of npm or yarn to speed up our install times and space efficiency. To install pnpm globally run:

npm install -g pnpm

MongoDB

for detailed instructions on installing MongoDB community edition on a Windows machine please refere to the MongoDB doc here.

After installation, whether you have installed as a Windows service or just the binaries, ensure that the MongoDB instance is started before you proceed.

Redis

To install Redis for local development you’ll first need to enable WSL2 (Windows Subsystem for Linux). detailed instructions for installing WSL can be found here

If you have WSL installed and enabled, you can easily install Redis using the native procedure for the Linux distribution that you have installed. for Ubuntu or Debian which is the default distro installed by WSL, use the following commands

  1. First install lsb-release, curl and gpg if you do not already have them:
sudo apt install lsb-release curl gpg
  1. Add the repository to the apt index, update it, and then install:
curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg

echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/redis.list

sudo apt-get update
sudo apt-get install redis
  1. Lastly, start the Redis server like so:
sudo service redis-server start

Docker

Docker is not a requirement to run Novu on your local machine, but if you would prefer to use Docker, Follow the installation guide on docker website to install Docker Desktop on your Windows machine.

AWS CLI

Follow the instructions to install the AWS CLI so you can use it to create env later on, based on existing S3 buckets:

Installing or updating the latest version of the AWS CLI

You should get something like this:

If needed, see:

Resolve “Unable to locate credentials” error in Amazon S3

Local dev domain (Optional)

This will allow you to use local.novu.co instead of localhost when accessing the service on your machine.

Navigate to C:\Windows\System32\drivers\etc in the file explorer and open the hosts file with a text editor (like Notepad):

Note that this file can only be edited when running as an Administrator.

And add the local.novu.co domain and save.

127.0.0.1       local.novu.co

Code Editor

Feel free to install your favorite code editor. We supply licenses for WebStorm, or you can Visual Studio Code if you prefer it.

Productivity tools

  • GitHub Desktop (Optional)

GitHub Desktop simplifies the development workflow and interaction with Git. Download the client from their website.