Initial working calendar system
- Full CRUD events (create, edit, delete API) - Day + Event modal UX flow - Timezone-safe event handling - Dockerized API + frontend + Postgres - Vite + Fastify integration working
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
FROM node:20-alpine
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./
|
||||
COPY apps/api/package.json apps/api/package.json
|
||||
|
||||
RUN corepack enable && pnpm install --filter ./apps/api... --frozen-lockfile=false
|
||||
|
||||
COPY apps/api ./apps/api
|
||||
|
||||
WORKDIR /app/apps/api
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
CMD ["pnpm", "dev"]
|
||||
@@ -3,7 +3,7 @@ import pg from "pg";
|
||||
const { Pool } = pg;
|
||||
|
||||
export const pool = new Pool({
|
||||
host: "localhost",
|
||||
host: "postgres",
|
||||
port: 5432,
|
||||
user: "postgres",
|
||||
password: "postgres",
|
||||
|
||||
@@ -7,7 +7,9 @@ const app = Fastify();
|
||||
|
||||
await app.register(cors, {
|
||||
origin: true,
|
||||
});
|
||||
methods: ['GET', 'POST', 'PUT', 'DELETE', 'OPTIONS'],
|
||||
allowedHeaders: ['Content-Type'],
|
||||
})
|
||||
|
||||
pool
|
||||
.query("SELECT NOW()")
|
||||
|
||||
Reference in New Issue
Block a user