Skip to content

Commit

Permalink
Update EB config
Browse files Browse the repository at this point in the history
  • Loading branch information
dekkerglen committed Apr 11, 2020
1 parent 3ccab99 commit d87418f
Show file tree
Hide file tree
Showing 7 changed files with 99 additions and 260 deletions.
7 changes: 7 additions & 0 deletions .ebextensions/00_yum_install.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
packages:
yum:
cairo: []
cairo-devel: []
libjpeg-turbo-devel: []
giflib-devel: []
libpng-devel: []
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
unsafe-perm=true
3 changes: 0 additions & 3 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,10 @@ const passport = require('passport');
const http = require('http');
const fileUpload = require('express-fileupload');
const MongoDBStore = require('connect-mongodb-session')(session);
const schedule = require('node-schedule');
const winston = require('winston');
const onFinished = require('on-finished');
const uuid = require('uuid/v4');
const tmp = require('tmp');
const updatedb = require('./serverjs/updatecards.js');
const carddb = require('./serverjs/cards.js');

const errorFile = tmp.fileSync({ prefix: `node-error-${process.pid}-`, postfix: '.log', discardDescriptor: true });
const combinedFile = tmp.fileSync({
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
"prettier-head": "prettier --write $(git diff HEAD --name-only | grep -E '.js$')",
"lint": "npm run prettier-base -- --check && eslint app.js models public/js routes serverjs src",
"nodemon": "nodemon --ignore src --ignore public --ignore private --ignore dist/pages --ignore __tests__",
"webpack": "webpack --mode development --config webpack.server.js",
"webpack-dev-server": "webpack-dev-server --config webpack.dev.js",
"build": "webpack --mode production --config webpack.prod.js --progress",
"webpack": "webpack --mode development --config webpack.server.js --port 8081",
"webpack-dev-server": "webpack-dev-server --config webpack.dev.js --port 8081",
"build": "webpack --mode production --config webpack.prod.js --progress --port 8081",
"start": "npm run nodemon & npm run webpack-dev-server & npm run webpack -- --watch",
"test": "jest --silent --detectOpenHandles --coverage",
"setup": "npm run webpack -- --progress && node --max-old-space-size=4096 force_update.js"
Expand Down
4 changes: 2 additions & 2 deletions routes/root.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const Blog = require('../models/blog');
const Cube = require('../models/cube');
const Deck = require('../models/deck');
const User = require('../models/user');
const Card = require('../models/card');
const CardHistory = require('../models/cardHistory');

const { NODE_ENV } = process.env;

Expand Down Expand Up @@ -341,7 +341,7 @@ async function getCardCubes(value) {

// otherwise just go to this ID.
const card = carddb.cardFromId(value);
const data = await Card.findOne({ cardName: card.name_lower });
const data = await CardHistory.findOne({ cardName: card.name_lower });
if (!data) {
return { _id: { $in: [] } };
}
Expand Down
6 changes: 3 additions & 3 deletions routes/tools_routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const { getElo } = require('../serverjs/cubefn.js');
const generateMeta = require('../serverjs/meta.js');

const CardRating = require('../models/cardrating');
const Card = require('../models/card');
const CardHistory = require('../models/cardHistory');
const Cube = require('../models/cube');

const router = express.Router();
Expand Down Expand Up @@ -69,7 +69,7 @@ async function matchingCards(filter) {
}
if (Filter.filterUses(filter, 'cubes')) {
const names = cards.map(({ name }) => name.toLowerCase());
const cardDatas = await Card.find(
const cardDatas = await CardHistory.find(
{
cardName: {
$in: names.map((name) => name.toLowerCase()),
Expand Down Expand Up @@ -123,7 +123,7 @@ async function topCards(filter) {
.sort('-elo')
.limit(MAX_RESULTS)
.lean();
const cardDataQ = Card.aggregate()
const cardDataQ = CardHistory.aggregate()
.match(
filter.length === 0
? {}
Expand Down
Loading

0 comments on commit d87418f

Please sign in to comment.