Setting things up
A tour of how to get the prerequisites done
Last updated
Was this helpful?
A tour of how to get the prerequisites done
Make a copy of the .env.example file and rename it to .env
cp .env.example .envFill in the values for the environment variables in the .env file. You can find the values for the variables in the Environment Variables section.
We tend to use docker for doing the heavy lifting on our behalf. Currently, we use it to set up the integration test environment before you make a commit. To make sure your experience is smooth, consider installing docker from https://docs.docker.com/engine/install/
Keyshade works with any active Long-Term Support (LTS) version of Node.js. You can download the current LTS version from the official Node.js website.
pnpmThe project uses pnpm as the package manager. To install pnpm, run the following command:
npm install -g pnpmFor Linux users, in case the above command fails with permission error, try running this:
sudo npm install -g pnpmTo install the dependencies, run the following command:
To make sure all the things work fine, build all these packages by running the following commands:
Build the secret-scan package:
Build the schema:
Build the api-client:
Or, want to save your precious time? Run all three commands in one go by running this command:
The final step involves installing our monorepo management tool. We have transitioned to using Turbo to streamline our development process. To install Turbo, run the following command:
For more information on how to get started with Turbo, refer to the official Turbo documentation.
If you plan to work on the API, you would need the NestJS CLI. To do this, simply run:
We cluster every dependency that Keyshade will need into our docker compose file. So, in order to start developing, you will first need to fire up these dependencies using one single command:
This will start the following things in a dockerized environment and then expose the services to your host machine:
PostgreSQL: This is the database that Keyshade uses to store all the data.
Redis: This is the cache store that Keyshade uses to store the cache data.
Please note that, in order for these steps to work, you will need to ensure that the following ports are free:
5432
6379
9000
9001
We have heard quite a few contributors facing a difficult time in getting PSQL to work. If you are facing issues with PostgreSQL, you can try the following:
Ensure that you don't have a local version of PostgreSQL running on your machine.
Make sure that you don't have any other docker containers running on the same port.
Once you have finished your development, it is recommended to shut down the docker infrastructure using:
Last updated
Was this helpful?
Was this helpful?
pnpm installpnpm build:secret-scanpnpm build:schemapnpm build:api-clientpnpm build:packagesnpm install turbo --globalnpm install -g @nestjs/clidocker compose up -ddocker compose down