wip
This commit is contained in:
parent
70aa6c0dd2
commit
71da8d04ee
2 changed files with 8 additions and 7 deletions
|
@ -1,4 +1,4 @@
|
||||||
FROM node:16
|
FROM node:latest
|
||||||
|
|
||||||
# Create app directory
|
# Create app directory
|
||||||
WORKDIR /usr/src/app
|
WORKDIR /usr/src/app
|
||||||
|
@ -15,5 +15,5 @@ RUN npm install
|
||||||
# Bundle app source
|
# Bundle app source
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
EXPOSE 8080
|
EXPOSE ${PORT}
|
||||||
CMD [ "node", "dist/index.js" ]
|
CMD [ "node", "dist/index.js" ]
|
11
src/index.ts
11
src/index.ts
|
@ -3,6 +3,10 @@ import GameSource from './GameSource';
|
||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
import Ics from './Ics';
|
import Ics from './Ics';
|
||||||
import express from 'express'
|
import express from 'express'
|
||||||
|
import env from 'dotenv';
|
||||||
|
|
||||||
|
env.config();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const CronJob = require('cron').CronJob;
|
const CronJob = require('cron').CronJob;
|
||||||
|
@ -53,12 +57,9 @@ const job = new CronJob(
|
||||||
'Asia/Jerusalem'
|
'Asia/Jerusalem'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const webServer = express();
|
const webServer = express();
|
||||||
webServer.use(express.static('public'))
|
webServer.use(express.static('public'))
|
||||||
|
|
||||||
webServer.listen(3000, () => {
|
webServer.listen(process.env.PORT, () => {
|
||||||
console.log('Example app listening on port 3000!')
|
console.log('Example app listening on port '+process.env.PORT+'!')
|
||||||
})
|
})
|
Loading…
Reference in a new issue