Initial dev branch commit

This commit is contained in:
Gabriel Brown 2024-11-01 13:43:05 -05:00
parent e2c65425af
commit dd26a3db33
2 changed files with 3 additions and 19 deletions

View File

@ -1,17 +0,0 @@
# Since the ".env" file is gitignored, you can use the ".env.example" file to
# build a new ".env" file when you clone the repo. Keep this file up-to-date
# when you add new variables to `.env`.
# This file will be committed to version control, so make sure not to have any
# secrets in it. If you are cloning this repo, create a copy of this file named
# ".env" and populate it with your secrets.
# When adding additional environment variables, the schema in "/src/env.js"
# should be updated accordingly.
# Drizzle
DATABASE_URL="postgresql://postgres:password@localhost:5432/wavelength_server"
# Example:
# SERVERVAR="foo"
# NEXT_PUBLIC_CLIENTVAR="bar"

View File

@ -1,7 +1,8 @@
import express from 'express';
import { Server } from 'socket.io';
import { createServer } from 'http';
import { Client, Notification } from 'pg';
import { Client } from 'pg';
import type { Notification } from 'pg';
import dotenv from 'dotenv';
dotenv.config();
@ -11,7 +12,7 @@ const httpServer = createServer(app);
// Create new Socket.IO server
const io = new Server(httpServer);
const PORT = process.env.PORT || 3030;
const PORT = process.env.PORT ?? 3020;
const pgClient = new Client({
connectionString: process.env.DATABASE_URL,