1
0

fix: remove deno from building & previewing

This commit is contained in:
alikia2x (寒寒) 2025-03-30 19:07:02 +08:00
parent 6fd34a88e7
commit 7aa988f0fe
Signed by: alikia2x
GPG Key ID: 56209E0CCD8420C6
3 changed files with 28 additions and 1 deletions

View File

@ -0,0 +1,7 @@
{
"name": "@cvsa/frontend",
"tasks": {
"preview": "bun run astro preview"
},
"exports": "./main.ts"
}

View File

@ -0,0 +1,7 @@
// DENO ASK ME TO EXPORT SOMETHING WHEN 'name' IS SPECIFIED
// AND IF I DON'T SPECIFY 'name', THE --filter FLAG IN `deno task` WON'T WORK.
// I DONT'T KNOW WHY
// SO HERE'S A PLACHOLDER EXPORT FOR DENO:
export const DENO = "FUCK YOU DENO";
// Oh, maybe export the version is a good idea
export const VERSION = "1.0.13";

View File

@ -2,10 +2,23 @@
import Layout from "@layouts/Layout.astro";
import TitleBar from "@components/TitleBar.astro";
import pg from "pg";
import { postgresConfig } from "@core/db/pgConfig.ts";
import { format } from 'date-fns';
import { zhCN } from 'date-fns/locale';
const databaseHost = process.env.DB_HOST
const databaseName = process.env.DB_NAME
const databaseUser = process.env.DB_USER
const databasePassword = process.env.DB_PASSWORD
const databasePort = process.env.DB_PORT
const postgresConfig = {
hostname: databaseHost,
port: parseInt(databasePort!),
database: databaseName,
user: databaseUser,
password: databasePassword,
};
// 路由参数
const { id } = Astro.params;
const { Client } = pg;