Skip to content

Latest commit

 

History

History
70 lines (46 loc) · 1.47 KB

README.md

File metadata and controls

70 lines (46 loc) · 1.47 KB

Krakend Playground Demo Builder

This repository contains the codebase for generating the Krakend Playground demo website using Next.js.

Getting Started

Installation

  1. Install dependencies:

    npm install

Configuration

Create a .env file in the root of your project with the following content:

NEXT_PUBLIC_KRAKEND_LICENSE_TYPE=enterprise

The NEXT_PUBLIC_KRAKEND_LICENSE_TYPE environment variable can be set to either "enterprise" or "open-source" depending on which playground you want to generate.

Running the Development Server

To start the development server, you can use one of the following commands:

npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev

Open http://localhost:3000 in your browser to view the project.

Building the Project

To build the project, you can use the following command:

npm run build

This will generate an out directory with the static HTML, CSS, and JavaScript files.

Adding or Updating Use-Case Demo Pages

You can add or edit use-case demo pages by modifying the .mdx files located in the pages/use-cases directory.

Sample File for a New Use-Case

To create a new use-case page, you can use the following structure in a .mdx file:

import MdxLayout from '@/components/MdxLayout';

## About this demo
- One
- Two
- Three

export default function MDXPage({ children }) {
  return <MdxLayout>{children}</MdxLayout>
}