Compare commits

...

2 commits

Author SHA1 Message Date
Kfir Dayan
85e1f7b863 done with dockerizing 2023-04-02 16:22:49 +03:00
Kfir Dayan
71da8d04ee wip 2023-04-02 16:09:45 +03:00
3 changed files with 10 additions and 7 deletions

2
.dockerignore Normal file
View file

@ -0,0 +1,2 @@
node_modules
npm-debug.log

View file

@ -1,4 +1,4 @@
FROM node:16
FROM node:latest
# Create app directory
WORKDIR /usr/src/app
@ -15,5 +15,5 @@ RUN npm install
# Bundle app source
COPY . .
EXPOSE 8080
EXPOSE ${PORT}
CMD [ "node", "dist/index.js" ]

View file

@ -3,6 +3,10 @@ import GameSource from './GameSource';
import fs from 'fs';
import Ics from './Ics';
import express from 'express'
import env from 'dotenv';
env.config();
const CronJob = require('cron').CronJob;
@ -53,12 +57,9 @@ const job = new CronJob(
'Asia/Jerusalem'
);
const webServer = express();
webServer.use(express.static('public'))
webServer.listen(3000, () => {
console.log('Example app listening on port 3000!')
webServer.listen(process.env.PORT, () => {
console.log('Example app listening on port '+process.env.PORT+'!')
})