finished client + added docker compose builds for client and server
Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
@@ -25,10 +25,8 @@ yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
# local env files
|
||||
.env.local
|
||||
.env.development.local
|
||||
.env.test.local
|
||||
.env.production.local
|
||||
.env*
|
||||
!.env.example
|
||||
|
||||
# vercel
|
||||
.vercel
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
FROM oven/bun:latest
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN bun install --frozen-lockfile
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
CMD ["bun", "run", "start"]
|
||||
@@ -1,10 +1,9 @@
|
||||
import { drizzleAdapter } from "better-auth/adapters/drizzle";
|
||||
import { admin, haveIBeenPwned } from "better-auth/plugins";
|
||||
import * as schema from "@/lib/db/schema/auth";
|
||||
import * as schema from "../db/schema/auth";
|
||||
import { passkey } from "@better-auth/passkey";
|
||||
import { betterAuth } from "better-auth";
|
||||
import { Context } from "elysia";
|
||||
import { db } from "@/lib/db";
|
||||
import { db } from "../db";
|
||||
|
||||
const rpID = process.env.BETTER_AUTH_URL?.replace(/^https?:\/\//, "") || "localhost";
|
||||
|
||||
|
||||
@@ -1,8 +1,15 @@
|
||||
{
|
||||
"name": "@turborepo-starter-project/server",
|
||||
"version": "1.0.50",
|
||||
"exports": {
|
||||
".": {
|
||||
"import": "./src/index.ts",
|
||||
"require": "./src/index.ts"
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"start": "bun run src/index.ts",
|
||||
"dev": "bun run --watch src/index.ts",
|
||||
"db:generate": "drizzle-kit generate",
|
||||
"db:migrate": "drizzle-kit migrate",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { auth } from "@/lib/auth";
|
||||
import { auth } from "../lib/auth";
|
||||
import { Elysia } from "elysia";
|
||||
import { z } from "zod";
|
||||
|
||||
@@ -6,6 +6,13 @@ const app = new Elysia()
|
||||
.mount("/auth", auth.handler)
|
||||
.listen(3000);
|
||||
|
||||
export type App = typeof app;
|
||||
|
||||
export const GET = app.get;
|
||||
export const POST = app.post;
|
||||
export const PUT = app.put;
|
||||
export const DELETE = app.delete;
|
||||
|
||||
console.log(
|
||||
`🦊 Elysia is running at ${app.server?.hostname}:${app.server?.port}`
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user