First, install Node.js 16. We recommend using nvm to manage your Node.js versions.
Clone the repo.
git clone https://github.com/holonym-foundation/phone-number-server.git
Install dependencies with npm.
npm install
Set environment variables. You might need to contact the team to get the values of some of these variables.
cp .env.example .env
Run redis on localhost:6379. You can do this with redis-server OR docker. The docker command might be different depending on your OS.
# redis-server
redis-server
# docker
docker run -p 6379:6379 redis
Run the development server.
npm run start
Git practices
We use a style of Gitflow.
- All changes should be pushed to the
dev
branch. - If a feature takes a while (e.g., weeks) to implement, prefer creating a feature branch. Once the feature is finished, rebase onto
dev
. - The
main
branch is protected. PRs tomain
can only be merged by authorized individuals. PRs tomain
are only merged fromdev
.
Linting and formatting
All commits must pass linting and formatting checks.
Run these commands prior to each commit:
# pnpm lint-fix
pnpm format-fix