Skip to content

Commit

Permalink
Merge pull request #7 from brinestone/b/undefined-base-url
Browse files Browse the repository at this point in the history
fix: crashing function call in staging
  • Loading branch information
conradbekondo authored Dec 27, 2024
2 parents 7d08ce3 + a473854 commit 7a1f0ac
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
8 changes: 6 additions & 2 deletions netlify/functions/helpers/db.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import { drizzle } from 'drizzle-orm/neon-serverless';
import * as users from '../config/db/schema/users';
import { drizzle } from 'drizzle-orm/neon-serverless';
import * as users from '../config/db/schema/users';
import { neonConfig } from '@neondatabase/serverless';
import ws from 'ws';

neonConfig.webSocketConstructor = global.WebSocket ?? ws;

export function useUsersDb() {
return drizzle({
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
"serverless-http": "^3.2.0",
"tailwindcss-primeui": "^0.3.4",
"tslib": "^2.3.0",
"ws": "^8.18.0",
"xstate": "^5.19.1",
"zod": "^3.24.1",
"zone.js": "~0.15.0"
Expand All @@ -65,6 +66,7 @@
"@types/passport": "^1.0.17",
"@types/passport-google-oauth20": "^2.0.16",
"@types/passport-jwt": "^4.0.1",
"@types/ws": "^8.5.13",
"autoprefixer": "^10.4.20",
"drizzle-kit": "^0.30.1",
"jasmine-core": "~5.4.0",
Expand Down
6 changes: 6 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7a1f0ac

Please sign in to comment.