feat: a reasonable base to work

This commit is contained in:
Paul Makles
2024-02-10 20:21:36 +00:00
parent fe7a81233e
commit b2d8676663
29 changed files with 535 additions and 132 deletions
+25 -1
View File
@@ -1,2 +1,26 @@
# Connection URL for Redis
REDIS=
MONGODB=
# Connection URL for MongoDB
MONGODB=
# Authentication
AUTHENTIK_ID=
AUTHENTIK_SECRET=
AUTHENTIK_ISSUER=https://sso.revolt.chat/application/o/swiss-army-knife
# Next Auth
NEXTAUTH_SECRET=
NEXTAUTH_URL=https://admin.revolt.chat
# Web server
PORT=3000
# Configure push notifications
NTFY_SERVER=https://ntfy.revolt.wtf
NTFY_TOPIC=reports
NTFY_USERNAME=admin-panel
NTFY_PASSWORD=
# Disable authentication and RBAC
# NEXT_PUBLIC_AUTH_TYPE=none
+13
View File
@@ -0,0 +1,13 @@
{
"tabWidth": 2,
"useTabs": false,
"plugins": ["@trivago/prettier-plugin-sort-imports"],
"importOrder": [
"<THIRD_PARTY_MODULES>",
"^@radix-ui",
"^\\.\\.",
"^[./]"
],
"importOrderSeparation": true,
"importOrderSortSpecifiers": true
}
+2
View File
@@ -1,10 +1,12 @@
```bash
bun install
bun run dev
```
production:
```bash
bun install
bun run build
bun run start
```
+6
View File
@@ -0,0 +1,6 @@
import { authOptions } from "@/lib/auth/serverConfig";
import NextAuth from "next-auth";
const handler = NextAuth(authOptions);
export { handler as GET, handler as POST };
+26
View File
@@ -0,0 +1,26 @@
"use client";
import { Card, Flex, Heading, Text, Theme } from "@radix-ui/themes";
import styles from "./home.module.css";
export default function Error({ error }: { error: Error }) {
return (
<Theme appearance="dark" panelBackground="solid">
<main
className={
styles.main + " h-[100vh] p-4 flex items-center justify-center"
}
>
<Card className="p-4">
<Flex direction="column" gap="4">
<Heading as="h1" size="8">
Internal Server Error
</Heading>
<Text>{String(error)}</Text>
</Flex>
</Card>
</main>
</Theme>
);
}
+8
View File
@@ -0,0 +1,8 @@
.main {
backdrop-filter: blur(24px);
background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)),
url("/maxim-berg-kE8-rUKjtQU-unsplash.jpg");
background-position: center;
background-repeat: no-repeat;
background-size: cover;
}
+13 -119
View File
@@ -1,28 +1,17 @@
import { ClientAuthProvider } from "@/lib/auth/clientProvider";
import type { Metadata } from "next";
import { Inter } from "next/font/google";
import "./globals.css";
import { Theme } from "@radix-ui/themes";
import "@radix-ui/themes/styles.css";
import { Avatar, Box, Button, Card, Flex, Text, Theme } from "@radix-ui/themes";
import {
Cross2Icon,
GroupIcon,
HomeIcon,
InfoCircledIcon,
Link1Icon,
LockClosedIcon,
MagnifyingGlassIcon,
PersonIcon,
ReaderIcon,
TrashIcon,
} from "@radix-ui/react-icons";
import Link from "next/link";
import "./globals.css";
const inter = Inter({ subsets: ["latin"] });
export const metadata: Metadata = {
title: "Revolt Admin Panel",
description: "Generated by create next app",
description: "Platform management and moderation tools.",
};
export default function RootLayout({
@@ -31,109 +20,14 @@ export default function RootLayout({
children: React.ReactNode;
}) {
return (
<html lang="en">
<body className={inter.className + " p-8"}>
<Theme>
<Flex>
<div className="relative">
<Flex
gap="2"
direction="column"
className="fixed left-0 top-0 w-[280px] h-[100vh] p-4 overflow-y-auto"
>
<img
src="https://app.revolt.chat/assets/wide.svg"
className="invert h-8 m-4"
/>
<Card>
<Flex gap="3" align="center">
<Avatar
size="3"
src="https://s.gravatar.com/avatar/9e06b7b88685681c231eb47693300a18?size=40&default=https%3A%2F%2Fadmin.revolt.chat%2Fhonse.png"
radius="full"
fallback="T"
/>
<Box>
<Text as="div" size="2" weight="bold">
insert@revolt.chat
</Text>
<Text as="div" size="2" color="gray">
Admin
</Text>
</Box>
</Flex>
</Card>
<Link href="/">
<Button variant="solid" className="!justify-start w-full">
<HomeIcon /> Home
</Button>
</Link>
<Button variant="surface" className="!justify-start">
<PersonIcon />
Team Members
</Button>
<Button variant="surface" className="!justify-start">
<GroupIcon />
Permissions & Groups
</Button>
<Button variant="surface" className="!justify-start">
<Link1Icon />
Integration Settings
</Button>
<Link href="/reports">
<Button variant="surface" className="!justify-start w-full">
<ReaderIcon /> Reports & Cases
</Button>
</Link>
<Button variant="surface" className="!justify-start">
<MagnifyingGlassIcon />
Search by ID
</Button>
<Button variant="surface" className="!justify-start">
<LockClosedIcon />
Authifier
</Button>
<Button variant="surface" className="!justify-start">
<TrashIcon />
Nuked Content
</Button>
<Button variant="surface" className="!justify-start">
<InfoCircledIcon />
About
</Button>
{/* <div className="w-[100%] border-t-[1px] border-t-gray" /> */}
{/* {[
"Case: Server(s) ijghhjifg",
"Server: Balls!",
"User: userisreal",
].map((x, i) => (
<Flex
gap="2"
key={i}
className="overflow-hidden min-w-0 flex-shrink-0 hover-btn"
>
<Button
variant="outline"
className="whitespace-nowrap text-ellipsis overflow-hidden !block !flex-shrink flex-grow"
>
{x}
</Button>
<Button variant="outline" color="tomato" className="btn">
<Cross2Icon />
</Button>
</Flex>
))} */}
</Flex>
</div>
<div className="w-[260px] flex-shrink-0" />
<ClientAuthProvider>
<html lang="en">
<body className={inter.className}>
<Theme appearance="dark" panelBackground="solid">
{children}
</Flex>
</Theme>
</body>
</html>
</Theme>
</body>
</html>
</ClientAuthProvider>
);
}
+23
View File
@@ -0,0 +1,23 @@
import { Card, Flex, Heading, Theme } from "@radix-ui/themes";
import styles from "./home.module.css";
export default function NotFound() {
return (
<Theme appearance="dark" panelBackground="solid">
<main
className={
styles.main + " h-[100vh] p-4 flex items-center justify-center"
}
>
<Card className="p-4">
<Flex direction="column" gap="4">
<Heading as="h1" size="8">
Page Not Found
</Heading>
</Flex>
</Card>
</main>
</Theme>
);
}
+34 -2
View File
@@ -1,3 +1,35 @@
export default function A() {
return <div>ding</div>;
import { LoginButton } from "@/components/common/auth/LoginButton";
import { Comic_Neue } from "next/font/google";
import { Card, Flex, Heading, Text } from "@radix-ui/themes";
import styles from "./home.module.css";
const comicNeue = Comic_Neue({ subsets: ["latin"], weight: "700" });
export default function Home() {
return (
<main
className={
styles.main + " h-[100vh] p-4 flex items-center justify-center"
}
>
<Card className="p-4">
<Flex direction="column" gap="4">
<Heading as="h1" size="8" className={comicNeue.className}>
Revolt Admin Panel
</Heading>
<LoginButton />
<Text align="center" size="1">
<a href="https://revolt.chat">revolt.chat</a> &middot;{" "}
<a href="https://git.is.horse/revolt/research-development/swiss-army-knife">
Project Information
</a>
</Text>
</Flex>
</Card>
</main>
);
}
+26
View File
@@ -0,0 +1,26 @@
import { PageTitle } from "@/components/common/navigation/PageTitle";
import { Metadata } from "next";
import { Text } from "@radix-ui/themes";
import pkg from "../../../package.json";
export const metadata: Metadata = {
title: "About",
description:
"Version information and other useful tidbits about this software.",
};
export default async function About() {
return (
<>
<PageTitle metadata={metadata} />
<Text>
Version {pkg.version} &middot;{" "}
<a href="https://git.is.horse/revolt/research-development/swiss-army-knife">
Source code
</a>
</Text>
</>
);
}
+19
View File
@@ -0,0 +1,19 @@
import { Sidebar } from "@/components/common/navigation/Sidebar";
import { Flex } from "@radix-ui/themes";
export default function Layout({ children }: { children: React.ReactNode }) {
return (
<div className="p-8">
<Flex gap="8">
<div className="relative">
<Sidebar />
</div>
<Flex direction="column" gap="2" grow="1">
{children}
</Flex>
</Flex>
</div>
);
}
+18
View File
@@ -0,0 +1,18 @@
import { PageTitle } from "@/components/common/navigation/PageTitle";
import { Metadata } from "next";
import { Text } from "@radix-ui/themes";
export const metadata: Metadata = {
title: "Dashboard",
description: "View pending alerts and important metrics from one place.",
};
export default function Dashboard() {
return (
<>
<PageTitle metadata={metadata} />
<Text>many such cases...</Text>
</>
);
}
BIN
View File
Binary file not shown.
+49
View File
@@ -0,0 +1,49 @@
"use client";
import { useAuthorisedUser } from "@/lib/auth";
import { signIn, signOut } from "next-auth/react";
import Link from "next/link";
import { Button, Flex } from "@radix-ui/themes";
export function LoginButton() {
if (process.env.NEXT_PUBLIC_AUTH_TYPE === "none") {
return (
<Button color="ruby" asChild>
<Link href="/panel">Continue as Instance Owner</Link>
</Button>
);
}
const user = useAuthorisedUser(true);
if (user) {
return (
<Flex gap="4">
<Button className="flex-1" asChild>
<Link href="/panel">Dashboard</Link>
</Button>
<Button color="ruby" className="flex-1" onClick={() => signOut()}>
Log Out
</Button>
</Flex>
);
}
const callbackUrl =
typeof window !== "undefined"
? new URLSearchParams(document.location.search).get("callbackUrl") ??
undefined
: undefined;
return (
<Button
onClick={() =>
signIn("authentik", {
callbackUrl,
})
}
>
Login with Revolt SSO
</Button>
);
}
@@ -0,0 +1,32 @@
"use client";
import { useAuthorisedUser } from "@/lib/auth";
import { signOut } from "next-auth/react";
import { ExitIcon } from "@radix-ui/react-icons";
import { Avatar, Box, Card, Flex, IconButton, Text } from "@radix-ui/themes";
export function AuthorisedUserCard() {
const { name, email, image, usingNextAuth } = useAuthorisedUser();
return (
<Card>
<Flex gap="3" align="center">
<Avatar size="3" src={image} radius="full" fallback="T" />
<Box grow="1">
<Text as="div" size="2" weight="bold">
{name}
</Text>
<Text as="div" size="2" color="gray">
{email} {/* or we can show top-most role */}
</Text>
</Box>
{usingNextAuth && (
<IconButton color="ruby" onClick={() => signOut()}>
<ExitIcon />
</IconButton>
)}
</Flex>
</Card>
);
}
@@ -0,0 +1,14 @@
import { Metadata } from "next";
import { Flex, Heading } from "@radix-ui/themes";
/**
* Render the page title
*/
export function PageTitle({ metadata }: { metadata: Metadata }) {
return (
<Flex className="h-14 items-center">
<Heading size="8">{metadata.title as string}</Heading>
</Flex>
);
}
+116
View File
@@ -0,0 +1,116 @@
"use client";
import Link from "next/link";
import { usePathname } from "next/navigation";
import {
ExitIcon,
GroupIcon,
HomeIcon,
InfoCircledIcon,
Link1Icon,
LockClosedIcon,
MagnifyingGlassIcon,
PersonIcon,
ReaderIcon,
TrashIcon,
} from "@radix-ui/react-icons";
import {
Avatar,
Box,
Button,
Card,
Flex,
IconButton,
Text,
} from "@radix-ui/themes";
import { AuthorisedUserCard } from "./AuthorisedUserCard";
export function Sidebar() {
const pathname = usePathname();
return (
<Flex gap="2" direction="column" className="w-[280px]">
<img src="/wide.svg" className="h-8 m-4" />
<AuthorisedUserCard />
<Button
variant={pathname === "/panel" ? "solid" : "surface"}
className="!justify-start"
asChild
>
<Link href="/panel">
<HomeIcon /> Home
</Link>
</Button>
<Button
variant={pathname === "/panel/reports" ? "solid" : "surface"}
className="!justify-start"
asChild
>
<Link href="/panel/reports">
<ReaderIcon /> Reports & Cases
</Link>
</Button>
{/*<Button variant="surface" className="!justify-start">
<PersonIcon />
Team Members
</Button>
<Button variant="surface" className="!justify-start">
<GroupIcon />
Permissions & Groups
</Button>
<Button variant="surface" className="!justify-start">
<Link1Icon />
Integration Settings
</Button>
<Button variant="surface" className="!justify-start">
<MagnifyingGlassIcon />
Search by ID
</Button>
<Button variant="surface" className="!justify-start">
<LockClosedIcon />
Authifier
</Button>
<Button variant="surface" className="!justify-start">
<TrashIcon />
Nuked Content
</Button> */}
<Button
variant={pathname === "/panel/about" ? "solid" : "surface"}
className="!justify-start"
asChild
>
<Link href="/panel/about">
<InfoCircledIcon />
About
</Link>
</Button>
{/* <div className="w-[100%] border-t-[1px] border-t-gray" /> */}
{/* {[
"Case: Server(s) ijghhjifg",
"Server: Balls!",
"User: userisreal",
].map((x, i) => (
<Flex
gap="2"
key={i}
className="overflow-hidden min-w-0 flex-shrink-0 hover-btn"
>
<Button
variant="outline"
className="whitespace-nowrap text-ellipsis overflow-hidden !block !flex-shrink flex-grow"
>
{x}
</Button>
<Button variant="outline" color="tomato" className="btn">
<Cross2Icon />
</Button>
</Flex>
))} */}
</Flex>
);
}
+11
View File
@@ -0,0 +1,11 @@
"use client";
import { SessionProvider } from "next-auth/react";
type Props = {
children?: React.ReactNode;
};
export const ClientAuthProvider = ({ children }: Props) => {
return <SessionProvider>{children}</SessionProvider>;
};
+43
View File
@@ -0,0 +1,43 @@
import { useSession } from "next-auth/react";
type AuthorisedUser = {
name: string;
email: string;
image: string;
usingNextAuth: boolean;
};
/**
* Use the currently authorised user
* @param allowNull Whether to allow a null user to be returned
* @returns User details
*/
export function useAuthorisedUser(allowNull = false): AuthorisedUser {
if (process.env.NEXT_PUBLIC_AUTH_TYPE === "none") {
return {
name: "Instance Owner",
email: "owner@example.com",
image: "/tmp/pfp.png",
usingNextAuth: false,
};
} else {
const { data: session } = useSession();
if (!session?.user?.email) {
if (allowNull) return null!;
return {
name: "Fetching user...",
email: "first.last@example.com",
image: "/tmp/pfp.png",
usingNextAuth: true,
};
}
return {
name: session.user.name ?? session.user.email ?? "A User",
email: session.user.email,
image: session.user.image ?? "/tmp/pfp.png",
usingNextAuth: true,
};
}
}
+21
View File
@@ -0,0 +1,21 @@
import type { AuthOptions } from "next-auth";
import AuthentikProvider from "next-auth/providers/authentik";
/**
* Authentication options
*/
export const authOptions: AuthOptions = {
providers: [
AuthentikProvider({
clientId: process.env.AUTHENTIK_ID!,
clientSecret: process.env.AUTHENTIK_SECRET!,
issuer: process.env.AUTHENTIK_ISSUER!,
}),
],
jwt: {
maxAge: 2 * 60 * 60, // 2 hours
},
pages: {
signIn: "/",
},
};
+8
View File
@@ -0,0 +1,8 @@
export { default } from "next-auth/middleware";
export const config = {
matcher: ["/panel"],
pages: {
signIn: "/",
},
};
+3
View File
@@ -19,6 +19,7 @@
"lru-cache": "^10.2.0",
"mongodb": "^6.3.0",
"next": "14.0.4",
"next-auth": "^4.24.5",
"node-cron": "^3.0.3",
"react": "^18",
"react-dom": "^18",
@@ -30,6 +31,7 @@
"ulid": "^2.3.0"
},
"devDependencies": {
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
"@types/node": "^20",
"@types/node-cron": "^3.0.11",
"@types/react": "^18",
@@ -39,6 +41,7 @@
"eslint-config-next": "14.0.4",
"nodemon": "^3.0.3",
"postcss": "^8",
"prettier": "^3.2.5",
"tailwindcss": "^3.3.0",
"typescript": "^5"
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 720 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

-1
View File
@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 394 80"><path fill="#000" d="M262 0h68.5v12.7h-27.2v66.6h-13.6V12.7H262V0ZM149 0v12.7H94v20.4h44.3v12.6H94v21h55v12.6H80.5V0h68.7zm34.3 0h-17.8l63.8 79.4h17.9l-32-39.7 32-39.6h-17.9l-23 28.6-23-28.6zm18.3 56.7-9-11-27.1 33.7h17.8l18.3-22.7z"/><path fill="#000" d="M81 79.3 17 0H0v79.3h13.6V17l50.2 62.3H81Zm252.6-.4c-1 0-1.8-.4-2.5-1s-1.1-1.6-1.1-2.6.3-1.8 1-2.5 1.6-1 2.6-1 1.8.3 2.5 1a3.4 3.4 0 0 1 .6 4.3 3.7 3.7 0 0 1-3 1.8zm23.2-33.5h6v23.3c0 2.1-.4 4-1.3 5.5a9.1 9.1 0 0 1-3.8 3.5c-1.6.8-3.5 1.3-5.7 1.3-2 0-3.7-.4-5.3-1s-2.8-1.8-3.7-3.2c-.9-1.3-1.4-3-1.4-5h6c.1.8.3 1.6.7 2.2s1 1.2 1.6 1.5c.7.4 1.5.5 2.4.5 1 0 1.8-.2 2.4-.6a4 4 0 0 0 1.6-1.8c.3-.8.5-1.8.5-3V45.5zm30.9 9.1a4.4 4.4 0 0 0-2-3.3 7.5 7.5 0 0 0-4.3-1.1c-1.3 0-2.4.2-3.3.5-.9.4-1.6 1-2 1.6a3.5 3.5 0 0 0-.3 4c.3.5.7.9 1.3 1.2l1.8 1 2 .5 3.2.8c1.3.3 2.5.7 3.7 1.2a13 13 0 0 1 3.2 1.8 8.1 8.1 0 0 1 3 6.5c0 2-.5 3.7-1.5 5.1a10 10 0 0 1-4.4 3.5c-1.8.8-4.1 1.2-6.8 1.2-2.6 0-4.9-.4-6.8-1.2-2-.8-3.4-2-4.5-3.5a10 10 0 0 1-1.7-5.6h6a5 5 0 0 0 3.5 4.6c1 .4 2.2.6 3.4.6 1.3 0 2.5-.2 3.5-.6 1-.4 1.8-1 2.4-1.7a4 4 0 0 0 .8-2.4c0-.9-.2-1.6-.7-2.2a11 11 0 0 0-2.1-1.4l-3.2-1-3.8-1c-2.8-.7-5-1.7-6.6-3.2a7.2 7.2 0 0 1-2.4-5.7 8 8 0 0 1 1.7-5 10 10 0 0 1 4.3-3.5c2-.8 4-1.2 6.4-1.2 2.3 0 4.4.4 6.2 1.2 1.8.8 3.2 2 4.3 3.4 1 1.4 1.5 3 1.5 5h-5.8z"/></svg>

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

-1
View File
@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 283 64"><path fill="black" d="M141 16c-11 0-19 7-19 18s9 18 20 18c7 0 13-3 16-7l-7-5c-2 3-6 4-9 4-5 0-9-3-10-7h28v-3c0-11-8-18-19-18zm-9 15c1-4 4-7 9-7s8 3 9 7h-18zm117-15c-11 0-19 7-19 18s9 18 20 18c6 0 12-3 16-7l-8-5c-2 3-5 4-8 4-5 0-9-3-11-7h28l1-3c0-11-8-18-19-18zm-10 15c2-4 5-7 10-7s8 3 9 7h-19zm-39 3c0 6 4 10 10 10 4 0 7-2 9-5l8 5c-3 5-9 8-17 8-11 0-19-7-19-18s8-18 19-18c8 0 14 3 17 8l-8 5c-2-3-5-5-9-5-6 0-10 4-10 10zm83-29v46h-9V5h9zM37 0l37 64H0L37 0zm92 5-27 48L74 5h10l18 30 17-30h10zm59 12v10l-3-1c-6 0-10 4-10 10v15h-9V17h9v9c0-5 6-9 13-9z"/></svg>

Before

Width:  |  Height:  |  Size: 629 B

+4
View File
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" width="193.733" height="37.438" viewBox="0 0 193.733 37.438">
<path d="M23.393,1.382c0,2.787-1.52,4.46-4.764,4.46H13.258V-2.977H18.63C21.873-2.977,23.393-1.254,23.393,1.382Zm-24-11.555,5.2,7.213V25.4h8.666V11.973h2.078l7.4,13.43h9.781l-8.21-14.089A10.355,10.355,0,0,0,32.212,1.027c0-6.183-4.358-11.2-13.075-11.2Zm60.035,0H37.634V25.4H59.426V18.46H46.3v-7.8H57.906V3.966H46.3V-2.969H59.426Zm20.981,26.86-8.818-26.86H62.365L74.984,25.4H85.83L98.449-10.173H89.276Zm56.659-9.173c0-10.693-8.058-18.194-18.194-18.194-10.085,0-18.3,7.5-18.3,18.194a17.9,17.9,0,0,0,18.3,18.244A17.815,17.815,0,0,0,137.066,7.514Zm-27.62,0c0-6.335,3.649-10.338,9.426-10.338,5.676,0,9.376,4,9.376,10.338,0,6.233-3.7,10.338-9.376,10.338C113.095,17.852,109.446,13.747,109.446,7.514ZM141.88-10.173V25.4H161.9v-6.95H150.545V-10.173Zm22.248,7.2h9.426V25.4h8.666V-2.975h9.426v-7.2H164.128Z" transform="translate(1.586 11.18)" fill="#fff" stroke="#fff" stroke-width="1"/>
<script xmlns="" id="bw-fido2-page-script"/></svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

+21 -8
View File
@@ -1,6 +1,19 @@
import {
bgBlue,
bgGreen,
bgRed,
blue,
gray,
red,
yellow,
} from "@colors/colors";
import { readFile, readdir } from "fs/promises";
import { createServer } from "http";
import { parse } from "url";
import next from "next";
import { resolve } from "path";
import { parse } from "url";
import { createLogger } from "./logger";
const dev = process.env.NODE_ENV !== "production";
const hostname = process.env.HOST || "localhost";
@@ -9,14 +22,9 @@ const port = parseInt(process.env.PORT || "3000");
const app = next({ dev, hostname, port });
const handle = app.getRequestHandler();
import { bgBlue, bgGreen, bgRed, gray, red } from "@colors/colors";
import { readdir, readFile } from "fs/promises";
import { resolve } from "path";
import { createLogger } from "./logger";
async function printVersion() {
const { version } = JSON.parse(
await readFile("package.json").then((f) => f.toString())
await readFile("package.json").then((f) => f.toString()),
);
console.log("\n");
@@ -29,6 +37,7 @@ async function loadModules() {
log(`Found ${modules.length} modules!`);
for (const moduleName of modules) {
if (moduleName !== "bot-shield") continue;
log(gray(`Initialising ${moduleName}`));
require(resolve(`server/.build/server/modules/${moduleName}/index.js`));
}
@@ -56,7 +65,11 @@ async function startApp() {
process.exit(1);
})
.listen(port, () =>
log(`Admin Panel is ready on http://${hostname}:${port}`)
log(
`${gray("Admin Panel is ready on http://")}${blue(hostname)}${gray(
":",
)}${yellow(port.toString())}`,
),
);
});
}