Initial dev branch commit
This commit is contained in:
parent
e2c65425af
commit
dd26a3db33
17
.env.example
17
.env.example
@ -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"
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user