Skip to content
This repository has been archived by the owner on Feb 3, 2022. It is now read-only.

Commit

Permalink
modernize dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
mekanoe committed Nov 1, 2018
1 parent ea51d94 commit 5a1fc52
Show file tree
Hide file tree
Showing 22 changed files with 8,605 additions and 22,685 deletions.
1 change: 1 addition & 0 deletions .dockerignore
@@ -1,3 +1,4 @@
/Server/.env
/Server/public
/Server/node_modules
/UI/node_modules
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -5,3 +5,4 @@ Server/\.env
Server/prod\.env

Server/test\.env
UI~
4 changes: 2 additions & 2 deletions Dockerfile
@@ -1,10 +1,10 @@
FROM node:9.3 AS builder
FROM node:10 AS builder
ENV NODE_ENV production
RUN npm i -g yarn
COPY . /src
RUN cd /src/UI && yarn && yarn build && cd /src/Server && yarn && mkdir public && mv /src/UI/build/* public

FROM mhart/alpine-node:9.3
FROM mhart/alpine-node:10
ENV NODE_ENV production
WORKDIR /dist
EXPOSE 6769
Expand Down
4 changes: 3 additions & 1 deletion Server/index.js
Expand Up @@ -8,6 +8,7 @@ const _io = require('socket.io')
const path = require('path')
const router = require('koa-better-router')().loadMethods()
const Roleypoly = require('./Roleypoly')
const ksuid = require('ksuid')

// monkey patch async-reduce because F U T U R E
Array.prototype.areduce = async function (predicate, acc = []) { // eslint-disable-line
Expand Down Expand Up @@ -88,7 +89,8 @@ async function start () {
key: 'roleypoly:sess',
maxAge: 'session',
siteOnly: true,
store: M.ctx.sessions
store: M.ctx.sessions,
genid: () => { return ksuid.randomSync().string }
}, app))

await M.mountRoutes()
Expand Down

0 comments on commit 5a1fc52

Please sign in to comment.