Compare commits
3
Commits
5c05db4580
..
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
912e1c46d9 | ||
|
|
3e32df5761 | ||
|
|
992c99d2fb |
+11
-6
@@ -1,19 +1,24 @@
|
||||
# For Build
|
||||
FROM node:22-slim as builder
|
||||
FROM node:22-slim AS base
|
||||
|
||||
ENV PNPM_HOME="/pnpm"
|
||||
ENV PATH="$PNPM_HOME:$PATH"
|
||||
RUN corepack enable
|
||||
WORKDIR /app
|
||||
|
||||
COPY package.json ./
|
||||
COPY package-lock.json ./
|
||||
COPY pnpm-lock.yaml ./
|
||||
COPY tsconfig.json ./
|
||||
RUN npm ci
|
||||
|
||||
FROM base AS builder
|
||||
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
|
||||
|
||||
COPY . .
|
||||
RUN pnpm run build
|
||||
|
||||
RUN npm run build
|
||||
|
||||
# For Run
|
||||
FROM node:22-slim
|
||||
FROM base
|
||||
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --prod --frozen-lockfile
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
|
||||
Vendored
+5
-3
@@ -1,13 +1,15 @@
|
||||
// See https://kit.svelte.dev/docs/types#app
|
||||
// for information about these interfaces
|
||||
import { Database } from 'pg';
|
||||
import { Pool } from "pg";
|
||||
import type { SimpleGit } from "simple-git";
|
||||
|
||||
declare global {
|
||||
namespace App {
|
||||
// interface Error {}
|
||||
interface Locals {
|
||||
db: any;
|
||||
}
|
||||
db: Pool;
|
||||
git: SimpleGit;
|
||||
}
|
||||
// interface PageData {}
|
||||
// interface PageState {}
|
||||
// interface Platform {}
|
||||
|
||||
+5
-3
@@ -7,15 +7,16 @@
|
||||
|
||||
color: var(--color-text);
|
||||
|
||||
padding-left: 2rem;
|
||||
padding-left: 0rem;
|
||||
box-sizing: border-box;
|
||||
|
||||
h1 {
|
||||
position: relative;
|
||||
width: auto;
|
||||
font-size: 1.8rem;
|
||||
margin-bottom: 0.5rem;
|
||||
margin-left: -1rem;
|
||||
padding: 1.5rem 0 0.25rem 0;
|
||||
margin: 0 0 0.75rem 0rem;
|
||||
border-bottom: 1px solid var(--color-outline);
|
||||
}
|
||||
|
||||
hr {
|
||||
@@ -27,6 +28,7 @@
|
||||
}
|
||||
|
||||
h2 {
|
||||
padding: 1rem 0 0.25rem 0;
|
||||
font-size: 1.5rem;
|
||||
position: relative;
|
||||
|
||||
|
||||
@@ -121,9 +121,8 @@
|
||||
border-top: none;
|
||||
border-bottom: none;
|
||||
min-height: 100%;
|
||||
padding: 20px;
|
||||
padding-top: 100px;
|
||||
max-width: 800px;
|
||||
padding: 100px 100px 0 100px;
|
||||
max-width: 900px;
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
@@ -149,7 +148,7 @@
|
||||
h1 {
|
||||
font-size: 2rem;
|
||||
text-align: center;
|
||||
margin: 0;
|
||||
margin: 0 -30px 0 -30px;
|
||||
padding: 12px;
|
||||
border-bottom: 1px solid rgba(255, 255, 255, 0.3);
|
||||
box-sizing: border-box;
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
import { json } from '@sveltejs/kit';
|
||||
import { error } from '@sveltejs/kit';
|
||||
import type { RequestHandler } from './$types';
|
||||
|
||||
export const GET: RequestHandler = async ({ url, locals }) => {
|
||||
const category = String(url.searchParams.get('category'));
|
||||
|
||||
if (!category) {
|
||||
error(400, 'Bad request');
|
||||
}
|
||||
|
||||
const db = await locals.db;
|
||||
const article = await db.query(
|
||||
'SELECT * FROM article WHERE category = $1',
|
||||
[category]
|
||||
);
|
||||
return new Response();
|
||||
};
|
||||
Reference in New Issue
Block a user