Skip to content
This repository has been archived by the owner on Oct 10, 2024. It is now read-only.

Latest commit

 

History

History
67 lines (41 loc) · 1.79 KB

README.md

File metadata and controls

67 lines (41 loc) · 1.79 KB

Primer API

Warning: ⚠️ This repository is being sunset and is no longer actively maintained. It was part of an internal experiment and is not likely in active use. Please consider migrating to alternative solutions or repositories.

A GraphQL API for collecting and accessing data about the Primer Design System

Data flow

Data flow diagram

Technology stack

Local development

Set up

  1. Clone the repository:

    git clone [email protected]:primer/api.git primer-api
    cd primer-api
  2. Run the setup script:

    npm run setup

    This will install and build any necessary dependencies.

  3. Create a .env file in the api directory of the repository with a DATABASE_URL variable:

    DATABASE_URL=...

    The DATABASE_URL variable should be set to a connection string for a PostgreSQL database. Ask @colebemis, @langermank, or @mperrotti for the connection string.

Run locally

  1. Run the start script:

    npm run start

    This will start the following servers locally:

Publish schema changes

  1. Make changes to the database schema in prisma/schema.prisma

  2. Run a migration:

    npm run prisma:migrate