Initial commit.
3
.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
node_modules/
|
||||
base_uri
|
||||
todo.md
|
84
app.js
Normal file
@ -0,0 +1,84 @@
|
||||
var
|
||||
express = require('express'),
|
||||
path = require('path'),
|
||||
favicon = require('static-favicon'),
|
||||
logger = require('morgan'),
|
||||
cookieParser = require('cookie-parser'),
|
||||
bodyParser = require('body-parser'),
|
||||
|
||||
routes = require('./routes/index'),
|
||||
search = require('./routes/search'),
|
||||
|
||||
pkg = require('./package'),
|
||||
app = express();
|
||||
|
||||
Object.assign(
|
||||
app.locals, {
|
||||
mw_site_uri: 'https://mythicwarsgame.com',
|
||||
site: {
|
||||
title: 'The Codex Mythica',
|
||||
description: "The Codex Mythica is a database of all of the cards released for the Mythic Wars card game. Browse through all of the cards in the game, or search to find the card(s) you're looking for.",
|
||||
keywords: 'codex, card game, mythic cards, mythic wars cards, mythic wars, clash of the gods, cthulhu rises, nemesis, excalibre, collectible card game, ccg, mythic sets, game, multiplayer, hobby, zeus, thor',
|
||||
base_uri: (process.env.NODE_ENV || '').toLowerCase().indexOf('dev') > -1 ? 'http://localhost:8302' : 'https://codex.mythicwarsgame.com'
|
||||
},
|
||||
author: {
|
||||
name: pkg.author.name,
|
||||
contact: pkg.author.email
|
||||
}
|
||||
});
|
||||
|
||||
// view engine setup
|
||||
app.set('views', path.join(__dirname, 'views'));
|
||||
// app.set('view engine', 'jade');
|
||||
app.set('view engine', 'ejs');
|
||||
|
||||
app.use(favicon());
|
||||
app.use(logger('dev'));
|
||||
app.use(bodyParser.json());
|
||||
app.use(bodyParser.urlencoded());
|
||||
app.use(cookieParser());
|
||||
app.use(express.static(path.join(__dirname, 'public')));
|
||||
|
||||
app.use((req, res, next) => {
|
||||
if (req && req.originalUrl && res) {
|
||||
res.locals.originalUrl = req.originalUrl;
|
||||
}
|
||||
next();
|
||||
});
|
||||
|
||||
app.use('/', routes);
|
||||
app.use('/search/', search);
|
||||
|
||||
/// catch 404 and forwarding to error handler
|
||||
app.use(function(req, res, next) {
|
||||
var err = new Error('Not Found');
|
||||
err.status = 404;
|
||||
next(err);
|
||||
});
|
||||
|
||||
/// error handlers
|
||||
|
||||
// development error handler
|
||||
// will print stacktrace
|
||||
if (app.get('env') === 'development') {
|
||||
app.use(function(err, req, res, next) {
|
||||
res.status(err.status || 500);
|
||||
res.render('error', {
|
||||
message: err.message,
|
||||
error: err
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// production error handler
|
||||
// no stacktraces leaked to user
|
||||
app.use(function(err, req, res, next) {
|
||||
res.status(err.status || 500);
|
||||
res.render('error', {
|
||||
message: err.message,
|
||||
error: {}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
module.exports = app;
|
9
bin/www
Executable file
@ -0,0 +1,9 @@
|
||||
#!/usr/bin/nodejs
|
||||
var debug = require('debug')('my-application');
|
||||
var app = require('../app');
|
||||
|
||||
app.set('port', process.env.PORT || 8302);
|
||||
|
||||
var server = app.listen(app.get('port'), function() {
|
||||
console.log('Express server listening on port ' + server.address().port);
|
||||
});
|
3026
lib/cards.json
Executable file
23
package.json
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"name": "@mysticbits/codex-mythica",
|
||||
"version": "0.0.1",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"start": "nodejs ./bin/www"
|
||||
},
|
||||
"dependencies": {
|
||||
"body-parser": "~1.0.0",
|
||||
"cookie-parser": "~1.0.1",
|
||||
"debug": "~0.7.4",
|
||||
"ejs": "^2.5.7",
|
||||
"express": "~4.0.0",
|
||||
"jade": "~1.3.0",
|
||||
"morgan": "~1.0.0",
|
||||
"static-favicon": "~1.0.0"
|
||||
},
|
||||
"author" : {
|
||||
"name" : "Eric Woodward",
|
||||
"email" : "eric@itsericwoodward.com",
|
||||
"url" : "https://itsericwoodward.com/"
|
||||
}
|
||||
}
|
BIN
public/images/elements/air.png
Executable file
After Width: | Height: | Size: 37 KiB |
BIN
public/images/elements/chaos.png
Executable file
After Width: | Height: | Size: 30 KiB |
BIN
public/images/elements/earth.png
Executable file
After Width: | Height: | Size: 36 KiB |
BIN
public/images/elements/fire.png
Executable file
After Width: | Height: | Size: 32 KiB |
BIN
public/images/elements/law.png
Executable file
After Width: | Height: | Size: 20 KiB |
BIN
public/images/elements/water.png
Executable file
After Width: | Height: | Size: 39 KiB |
BIN
public/images/empower.png
Executable file
After Width: | Height: | Size: 17 KiB |
BIN
public/images/mw-logo-wide-300x70.png
Executable file
After Width: | Height: | Size: 32 KiB |
BIN
public/images/pantheons/aztec.png
Executable file
After Width: | Height: | Size: 35 KiB |
BIN
public/images/pantheons/egyptian.png
Executable file
After Width: | Height: | Size: 25 KiB |
BIN
public/images/pantheons/eternal.png
Normal file
After Width: | Height: | Size: 26 KiB |
BIN
public/images/pantheons/greek.png
Executable file
After Width: | Height: | Size: 23 KiB |
BIN
public/images/pantheons/japanese.png
Executable file
After Width: | Height: | Size: 23 KiB |
BIN
public/images/pantheons/norse.png
Executable file
After Width: | Height: | Size: 26 KiB |
BIN
public/images/pantheons/old-ones.png
Executable file
After Width: | Height: | Size: 26 KiB |
BIN
public/images/pantheons/sumerian.png
Executable file
After Width: | Height: | Size: 30 KiB |
BIN
public/images/scores/att-5.png
Executable file
After Width: | Height: | Size: 28 KiB |
BIN
public/images/scores/att-6.png
Executable file
After Width: | Height: | Size: 29 KiB |
BIN
public/images/scores/att-7.png
Executable file
After Width: | Height: | Size: 26 KiB |
BIN
public/images/scores/att-8.png
Executable file
After Width: | Height: | Size: 30 KiB |
BIN
public/images/scores/att-9.png
Executable file
After Width: | Height: | Size: 29 KiB |
BIN
public/images/scores/def-5.png
Executable file
After Width: | Height: | Size: 38 KiB |
BIN
public/images/scores/def-6.png
Executable file
After Width: | Height: | Size: 40 KiB |
BIN
public/images/scores/def-7.png
Executable file
After Width: | Height: | Size: 38 KiB |
BIN
public/images/scores/def-8.png
Executable file
After Width: | Height: | Size: 41 KiB |
BIN
public/images/scores/def-9.png
Executable file
After Width: | Height: | Size: 39 KiB |
BIN
public/images/scores/pow-5.png
Executable file
After Width: | Height: | Size: 25 KiB |
BIN
public/images/scores/pow-6.png
Executable file
After Width: | Height: | Size: 27 KiB |
BIN
public/images/scores/pow-7.png
Executable file
After Width: | Height: | Size: 24 KiB |
BIN
public/images/scores/pow-8.png
Executable file
After Width: | Height: | Size: 27 KiB |
BIN
public/images/scores/pow-9.png
Executable file
After Width: | Height: | Size: 26 KiB |
BIN
public/images/thumb/rot-s01n01_arena.jpg
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
public/images/thumb/rot-s01n02_bifrost.jpg
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
public/images/thumb/rot-s01n03_duat.jpg
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
public/images/thumb/rot-s01n04_mount_olympus.jpg
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
public/images/thumb/rot-s01n05_rlyeh.jpg
Normal file
After Width: | Height: | Size: 10 KiB |
BIN
public/images/thumb/s01c01_chalchiuhtlicue.jpg
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
public/images/thumb/s01c02_chicomecoatl.jpg
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
public/images/thumb/s01c03_cihuacoatl.jpg
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
public/images/thumb/s01c04_coatlicue.jpg
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
public/images/thumb/s01c05_huehueteotl.jpg
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
public/images/thumb/s01c06_huitzilopochtli.jpg
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
public/images/thumb/s01c07_mictecacihuatl.jpg
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
public/images/thumb/s01c08_mictlantecuhtli.jpg
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
public/images/thumb/s01c09_quetzalcoatl.jpg
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
public/images/thumb/s01c10_tezcatlipoca.jpg
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
public/images/thumb/s01c11_tlaloc.jpg
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
public/images/thumb/s01c12_xiuhtecuhtli.jpg
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
public/images/thumb/s01c13_amun.jpg
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
public/images/thumb/s01c14_anubis.jpg
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
public/images/thumb/s01c15_hathor.jpg
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
public/images/thumb/s01c16_horus.jpg
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
public/images/thumb/s01c17_isis.jpg
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
public/images/thumb/s01c17_isis_conflict-20171224-192232.jpg
Normal file
After Width: | Height: | Size: 19 KiB |
BIN
public/images/thumb/s01c18_osiris.jpg
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
public/images/thumb/s01c18_osiris_conflict-20171224-192232.jpg
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
public/images/thumb/s01c19_ra.jpg
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
public/images/thumb/s01c19_ra_conflict-20171224-192232.jpg
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
public/images/thumb/s01c20_seker.jpg
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
public/images/thumb/s01c20_seker_conflict-20171224-192232.jpg
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
public/images/thumb/s01c21_sekhmet.jpg
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
public/images/thumb/s01c21_sekhmet_conflict-20171224-192232.jpg
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
public/images/thumb/s01c22_set.jpg
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
public/images/thumb/s01c22_set_conflict-20171224-192232.jpg
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
public/images/thumb/s01c23_taweret.jpg
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
public/images/thumb/s01c23_taweret_conflict-20171224-192233.jpg
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
public/images/thumb/s01c24_wadjet.jpg
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
public/images/thumb/s01c24_wadjet_conflict-20171224-192233.jpg
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
public/images/thumb/s01c25_aphrodite.jpg
Normal file
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 14 KiB |
BIN
public/images/thumb/s01c26_apollo.jpg
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
public/images/thumb/s01c26_apollo_conflict-20171224-192233.jpg
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
public/images/thumb/s01c27_ares.jpg
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
public/images/thumb/s01c27_ares_conflict-20171224-192233.jpg
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
public/images/thumb/s01c28_artemis.jpg
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
public/images/thumb/s01c28_artemis_conflict-20171224-192233.jpg
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
public/images/thumb/s01c29_athena.jpg
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
public/images/thumb/s01c29_athena_conflict-20171224-192233.jpg
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
public/images/thumb/s01c30_demeter.jpg
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
public/images/thumb/s01c30_demeter_conflict-20171224-192233.jpg
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
public/images/thumb/s01c31_hephaestus.jpg
Normal file
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 14 KiB |
BIN
public/images/thumb/s01c32_hera.jpg
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
public/images/thumb/s01c32_hera_conflict-20171224-192233.jpg
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
public/images/thumb/s01c33_hermes.jpg
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
public/images/thumb/s01c33_hermes_conflict-20171224-192233.jpg
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
public/images/thumb/s01c34_hestia.jpg
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
public/images/thumb/s01c34_hestia_conflict-20171224-192233.jpg
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
public/images/thumb/s01c35_poseidon.jpg
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
public/images/thumb/s01c35_poseidon_conflict-20171224-192233.jpg
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
public/images/thumb/s01c36_zeus.jpg
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
public/images/thumb/s01c36_zeus_conflict-20171224-192233.jpg
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
public/images/thumb/s01c37_amaterasu.jpg
Normal file
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 21 KiB |
BIN
public/images/thumb/s01c38_benzaiten.jpg
Normal file
After Width: | Height: | Size: 13 KiB |