mirror of
https://github.com/jcreek/EstimationPoker.git
synced 2026-07-12 18:43:47 +00:00
feat(*): Update server for deploying
This commit is contained in:
@@ -0,0 +1 @@
|
||||
node_modules
|
||||
@@ -0,0 +1,19 @@
|
||||
FROM node:20
|
||||
|
||||
# Create app directory
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
# Install app dependencies
|
||||
# A wildcard is used to ensure both package.json AND package-lock.json are copied
|
||||
COPY package*.json ./
|
||||
|
||||
RUN npm update
|
||||
RUN npm install
|
||||
# If you are building your code for production
|
||||
# RUN npm ci --only=production
|
||||
|
||||
# Bundle app source
|
||||
COPY . .
|
||||
|
||||
EXPOSE 8080
|
||||
CMD [ "npm", "run", "start" ]
|
||||
@@ -0,0 +1,9 @@
|
||||
# Web Sockets Server
|
||||
|
||||
## Deploying
|
||||
|
||||
Use Docker to deploy this.
|
||||
|
||||
Navigate to this folder and run `docker build -t estimation-ws-server .` to build the image.
|
||||
|
||||
Run it using `docker run -it --rm -p 8080:8080 estimation-ws-server`
|
||||
@@ -7,7 +7,7 @@ import { ChangeEstimateMessage } from './classes/messages/ChangeEstimateMessage.
|
||||
import { SelectEstimateMessage } from './classes/messages/SelectEstimateMessage.js';
|
||||
|
||||
const app = express();
|
||||
const port = process.env.PORT || 3000;
|
||||
const port = process.env.PORT || 8080;
|
||||
|
||||
function onSocketPreError(e: Error) {
|
||||
console.log(e);
|
||||
|
||||
Reference in New Issue
Block a user