fix: remove deno from building & previewing
This commit is contained in:
parent
6fd34a88e7
commit
7aa988f0fe
7
packages/frontend/deno.json
Normal file
7
packages/frontend/deno.json
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"name": "@cvsa/frontend",
|
||||
"tasks": {
|
||||
"preview": "bun run astro preview"
|
||||
},
|
||||
"exports": "./main.ts"
|
||||
}
|
||||
7
packages/frontend/main.ts
Normal file
7
packages/frontend/main.ts
Normal 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";
|
||||
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user