Skip to content

Repository server backend for hosting packages for the apm client.

Notifications You must be signed in to change notification settings

airsdk/apm-repository

Repository files navigation

AIR SDK logo

repository.airsdk.dev

Source for the repository.airsdk.dev site. Repository server backend for hosting packages for the `apm` client.

Getting Started

This site is built with NextJS using React, TypeScript and prisma for data modelling. It is setup to use a mysql database but there is no direct requirement for this, any database can be configured to be the data source.

It currently has been built with Node v12.

Install

To setup your development environment download the code and then install the dependencies using npm

nvm use
npm install

Setup

Setup the environment by connecting a database. Create a .env in the root of the project and add a definition for DATABASE_URL as your database connection string, eg:

DATABASE_URL="mysql://USERNAME:PASSWORD@localhost:3306/apm_repository"

To generate your initial prisma mappings run:

npx prisma generate

Prisma supports the native connection string format for PostgreSQL, MySQL and SQLite. See the documentation for all the connection string options

Populate the database with the correct database structure by running:

npx prisma db push

This will create all the required tables in the database.

Running

To run the development server:

npm run dev

Open http://localhost:3000 with your browser to see the result.

Deploy

npm run build