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.
To setup your development environment download the code and then install the dependencies using npm
nvm use
npm install
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.
To run the development server:
npm run dev
Open http://localhost:3000 with your browser to see the result.
npm run build