From 9e4568c8ebc15cf550d0b464b326dae3641e8aa3 Mon Sep 17 00:00:00 2001 From: Tben Date: Mon, 21 Aug 2023 09:14:02 +0100 Subject: [PATCH] updates --- .dockerignore | 1 + Dockerfile | 20 ++++++++++++++++++++ app/(components)/AboutSection.tsx | 7 +++++++ app/layout.tsx | 5 +++++ pages/api/test.ts | 11 +++++++++++ 5 files changed, 44 insertions(+) create mode 100644 .dockerignore create mode 100644 Dockerfile create mode 100644 pages/api/test.ts diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..b512c09 --- /dev/null +++ b/.dockerignore @@ -0,0 +1 @@ +node_modules \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..efd0af0 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,20 @@ +# Set Node.js version +FROM node:16 + +# Set working directory +WORKDIR /usr/src/app + +# Copy package.json and package-lock.json +COPY package*.json ./ + +# Install dependencies +RUN npm install + +# Copy source code +COPY . . + +# Expose port 3000 +EXPOSE 3000 + +# Run the app +CMD ["npm", "run", "build", "&&", "npm", "start"] \ No newline at end of file diff --git a/app/(components)/AboutSection.tsx b/app/(components)/AboutSection.tsx index 06ad946..33c63df 100644 --- a/app/(components)/AboutSection.tsx +++ b/app/(components)/AboutSection.tsx @@ -1,3 +1,10 @@ +/** # MODULE TRACE +====================================================================== + * Detected 1 files that call this module. The files are listed below: +====================================================================== + * `import` Statement Found in [HomepageComponent.tsx] => file:///d:\GitHub\personal_site\app\(components)\HomepageComponent.tsx +==== MODULE TRACE END ==== */ + "use client"; import React from "react"; diff --git a/app/layout.tsx b/app/layout.tsx index 2facedc..9f29580 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -1,3 +1,8 @@ +/** # MODULE TRACE +====================================================================== + * No imports found for this Module +==== MODULE TRACE END ==== */ + // General imports import { Metadata } from "next"; import GeneralLayout from "../layouts/general_layout/GeneralLayout"; diff --git a/pages/api/test.ts b/pages/api/test.ts new file mode 100644 index 0000000..f6ac2cb --- /dev/null +++ b/pages/api/test.ts @@ -0,0 +1,11 @@ +import { NextApiHandler, NextApiRequest, NextApiResponse } from "next"; + +/** + * @type {NextApiHandler} + */ +export default function handler(req: NextApiRequest, res: NextApiResponse) { + return res.status(200).json({ + title: "Hello There", + message: "General Kenobi", + }); +}