should work on both localhost and outside.

This commit is contained in:
pulipakaa24
2026-03-19 13:48:19 -05:00
parent 6026e4dda6
commit 8c2f8fa7b1
11 changed files with 157 additions and 61 deletions

View File

@@ -1,3 +1,4 @@
import 'dotenv/config';
import express from 'express';
import cors from 'cors';
import { toNodeHandler } from 'better-auth/node';
@@ -8,6 +9,7 @@ import protocolsRouter from './routes/protocols';
import path from 'path';
const app = express();
console.log(process.env.BETTER_AUTH_URL, process.env.BETTER_AUTH_SECRET);
const PORT = process.env.PORT || 3001;
const UPLOADS_DIR = process.env.UPLOADS_DIR || path.join(__dirname, '../uploads');
@@ -41,4 +43,6 @@ app.get('/api/health', (_req, res) => res.json({ ok: true }));
app.listen(PORT, () => {
console.log(`LabWise API running on http://localhost:${PORT}`);
console.log('BETTER_AUTH_URL:', process.env.BETTER_AUTH_URL);
console.log('BETTER_AUTH_SECRET:', process.env.BETTER_AUTH_SECRET);
});