Keyshade Alpha is launching April 30th 5:00 PM IST
Join our Launch Party
keyshade docs
GithubDiscordReddit
  • 👋What is keyshade?
  • Getting Started
    • Introduction
    • Adding your first secret and variable
    • Installing the CLI
    • Setting up your profile
    • Add keyshade to your project
    • Running your app
  • CLI
    • Introduction
    • Profile
    • Init
    • Workspace
    • Project
    • Environment
    • Run
    • Scan
  • 🥰CONTRIBUTING TO KEYSHADE
    • Summary
    • Design of our code
      • Organization of code
      • API
      • CLI
      • Web
      • Integrations
    • Prerequisites
    • Environment Variables
    • Setting things up
    • Running things locally
      • Running the API
      • Running the Web
      • Running the Platform
      • Running the CLI
      • API Testing
      • Docker Support
  • Internals
    • Architecture of keyshade
    • How the CLI works
Powered by GitBook
On this page

Was this helpful?

Edit on GitHub
  1. CONTRIBUTING TO KEYSHADE
  2. Running things locally

Running the API

Get to know how you can develop the API!

The API resides in the apps/api directory. It is a NestJS project. To run the API locally, do the following:

  • Generate the prisma types:

pnpm run db:generate-types
  • Deploy the migrations:

pnpm run db:deploy-migrations
  • Start the server in development mode:

pnpm run dev:api
  • There might be a case when you would like to create a completely fresh copy of the database. In that case, you might use the reset command:

pnpm run db:reset

Testing your code

We currently perform two kinds of tests: unit tests and integration tests.

After you make sure that you have added your unit tests, or you have made some changes to the existing functionality, you can run them using:

pnpm run unit:api

After this is complete, you can run end-to-end tests to validate your entire application from start to finish. Use this command:

pnpm run e2e:api

You can also skip these first two commands and perform the unit and e2e tests at the same time with:

pnpm run test:api
PreviousRunning things locallyNextRunning the Web

Last updated 7 months ago

Was this helpful?

🥰