mirror of https://github.com/knative/docs.git
* Add darkmode * Edit README * Add comments and readme * Fix UI * Update README * Update code-samples/eventing/bookstore-sample-app/frontend/client/pages/Main.js Co-authored-by: Leo Li <leoli@redhat.com> * Update code-samples/eventing/bookstore-sample-app/frontend/client/components/BookDetail.js Co-authored-by: Leo Li <leoli@redhat.com> * Change emoji * Update code-samples/eventing/bookstore-sample-app/frontend/client/components/Toggle.js Co-authored-by: Leo Li <leoli@redhat.com> * Fix UI * Align time --------- Co-authored-by: Leo Li <leoli@redhat.com> |
||
---|---|---|
.. | ||
app | ||
client | ||
public/images | ||
.eslintrc.json | ||
.gitignore | ||
Dockerfile | ||
README.md | ||
next.config.mjs | ||
package-lock.json | ||
package.json | ||
postcss.config.js | ||
tailwind.config.ts | ||
tsconfig.json |
README.md
Getting Started
This app use Next.js and TailwindCSS as main packages. Use this command to install all dependencies:
npm install
To run application, use:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
Open http://localhost:3000 with your browser to see the result.
Project Structures
- app/: Contains the main layout, page, and global styling.
- client/: Contains components and pages used in the application.
- public/images/: Contains image files.
- next-env.d.ts, next.config.mjs, package-lock.json, package.json, postcss.config.js, tailwind.config.js, tsconfig.json: Configuration files for Next.js, Tailwind CSS, and TypeScript.
Containerize Application
This repository contains a Next.js application that utilizes next-themes and Tailwind CSS. This README file provides instructions on how to containerize the application using Docker.
Prerequisites
- Docker installed on your machine. You can download and install Docker from here.
Dockerization Steps
- Clone this repository to your local machine.
- Navigate to the root directory of the cloned repository.
Building the Docker Image
Run the following command to build the Docker image:
docker build -t frontend .
Running the Docker Container
Once the image is built, you can run a container using the following command:
docker run -d -p 3000:3000 frontend