Skip to content

Commit

Permalink
feat: make port configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelTaylor3D committed Mar 7, 2022
1 parent 0687eac commit 21401b5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .env.copy
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ DB_USERNAME=
DB_PASSWORD=
DB_NAME=
DB_HOST=
CW_PORT=31310
DATALAYER_URL=https://localhost:8562
WALLET_URL=https://localhost:9256
USE_SIMULATOR=false
PICKLIST_URL=https://climate-warehouse.s3.us-west-2.amazonaws.com/public/picklists.json
DEFAULT_ORGANIZATIONS=https://climate-warehouse.s3.us-west-2.amazonaws.com/public/cw-organizations.json
READ_ONLY=false
API_KEY=
API_KEY=
5 changes: 4 additions & 1 deletion src/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,14 @@ import { Server } from 'socket.io';
import Debug from 'debug';
import { connection } from './websocket';
import scheduler from './tasks';
import dotenv from 'dotenv';

dotenv.config();
Debug.enable('climate-warehouse:*');

const debug = Debug('climate-warehouse:server');

const port = 3030;
const port = process.env.CW_PORT || 3030;
const server = http.createServer(rootRouter);

server.on('error', onError);
Expand Down

0 comments on commit 21401b5

Please sign in to comment.