diff --git a/api/load_balancer.go b/api/load_balancer.go index dd07841..48dded3 100644 --- a/api/load_balancer.go +++ b/api/load_balancer.go @@ -110,10 +110,12 @@ func LoadBalancer(proxyPort string, backends []Backend) { go HealthCheck() s := http.Server{ - Addr: ":" + cfg.ProxyPort, - Handler: http.HandlerFunc(lbHandler), + Addr: ":" + cfg.ProxyPort, + Handler: http.HandlerFunc(lbHandler), + ReadHeaderTimeout: 10 * time.Second, // Set an appropriate timeout value } + if err := s.ListenAndServe(); err != nil { - log.Fatal(err.Error()) + log.Printf("Error starting server: %s", err.Error()) } } diff --git a/docs/docusaurus.config.ts b/docs/docusaurus.config.ts index 8037f5d..3bcf26a 100644 --- a/docs/docusaurus.config.ts +++ b/docs/docusaurus.config.ts @@ -1,4 +1,4 @@ -import type * as Preset from "@docusaurus/preset-classic"; +import * as Preset from "@docusaurus/preset-classic"; import type { Config } from "@docusaurus/types"; import { themes as prismThemes } from "prism-react-renderer"; @@ -136,7 +136,7 @@ const config: Config = { ], }, ], - copyright: `Copyright © 2024 Gouse ❤️`, + copyright: "Copyright © 2024 Gouse ❤️", }, prism: { theme: prismThemes.github, @@ -150,7 +150,7 @@ const config: Config = { } satisfies Preset.ThemeConfig, plugins: [ - async function myPlugin(context, options) { + function myPlugin(_context, _options) { return { name: "docusaurus-tailwindcss", configurePostCss(postcssOptions) { diff --git a/docs/src/components/HomepageFeatures/index.tsx b/docs/src/components/HomepageFeatures/index.tsx index 77382a3..826c8ae 100644 --- a/docs/src/components/HomepageFeatures/index.tsx +++ b/docs/src/components/HomepageFeatures/index.tsx @@ -2,6 +2,7 @@ import clsx from "clsx"; import styles from "./styles.module.css"; type FeatureItem = { + _id: string; title: string; Svg: React.ComponentType>; description: JSX.Element; @@ -9,6 +10,7 @@ type FeatureItem = { const FeatureList: FeatureItem[] = [ { + _id: "1", title: "Easy to Use", Svg: require("@site/static/img/undraw_docusaurus_mountain.svg").default, description: ( @@ -19,6 +21,7 @@ const FeatureList: FeatureItem[] = [ ), }, { + _id: "2", title: "Focus on What Matters", Svg: require("@site/static/img/undraw_docusaurus_tree.svg").default, description: ( @@ -29,6 +32,7 @@ const FeatureList: FeatureItem[] = [ ), }, { + _id: "3", title: "Powered by React", Svg: require("@site/static/img/undraw_docusaurus_react.svg").default, description: ( @@ -59,8 +63,8 @@ export default function HomepageFeatures(): JSX.Element {
- {FeatureList.map((props, idx) => ( - + {FeatureList.map((props) => ( + ))}
diff --git a/docs/src/pages/index.tsx b/docs/src/pages/index.tsx index a041f24..b374338 100644 --- a/docs/src/pages/index.tsx +++ b/docs/src/pages/index.tsx @@ -28,8 +28,8 @@ function HomepageHeader() {

{siteConfig.tagline}

- {buttons.map((button) => ( -