Initial commit.
3
.gitignore
已供應
一般檔案
@@ -0,0 +1,3 @@
|
|||||||
|
node_modules/
|
||||||
|
base_uri
|
||||||
|
todo.md
|
||||||
84
app.js
一般檔案
@@ -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
可執行檔
@@ -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
可執行檔
23
package.json
一般檔案
@@ -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/"
|
||||||
|
}
|
||||||
|
}
|
||||||
二進制
public/images/elements/air.png
可執行檔
|
之後 寬度: | 高度: | 大小: 37 KiB |
二進制
public/images/elements/chaos.png
可執行檔
|
之後 寬度: | 高度: | 大小: 30 KiB |
二進制
public/images/elements/earth.png
可執行檔
|
之後 寬度: | 高度: | 大小: 36 KiB |
二進制
public/images/elements/fire.png
可執行檔
|
之後 寬度: | 高度: | 大小: 32 KiB |
二進制
public/images/elements/law.png
可執行檔
|
之後 寬度: | 高度: | 大小: 20 KiB |
二進制
public/images/elements/water.png
可執行檔
|
之後 寬度: | 高度: | 大小: 39 KiB |
二進制
public/images/empower.png
可執行檔
|
之後 寬度: | 高度: | 大小: 17 KiB |
|
之後 寬度: | 高度: | 大小: 32 KiB |
二進制
public/images/pantheons/aztec.png
可執行檔
|
之後 寬度: | 高度: | 大小: 35 KiB |
二進制
public/images/pantheons/egyptian.png
可執行檔
|
之後 寬度: | 高度: | 大小: 25 KiB |
二進制
public/images/pantheons/eternal.png
一般檔案
|
之後 寬度: | 高度: | 大小: 26 KiB |
二進制
public/images/pantheons/greek.png
可執行檔
|
之後 寬度: | 高度: | 大小: 23 KiB |
二進制
public/images/pantheons/japanese.png
可執行檔
|
之後 寬度: | 高度: | 大小: 23 KiB |
二進制
public/images/pantheons/norse.png
可執行檔
|
之後 寬度: | 高度: | 大小: 26 KiB |
二進制
public/images/pantheons/old-ones.png
可執行檔
|
之後 寬度: | 高度: | 大小: 26 KiB |
二進制
public/images/pantheons/sumerian.png
可執行檔
|
之後 寬度: | 高度: | 大小: 30 KiB |
二進制
public/images/scores/att-5.png
可執行檔
|
之後 寬度: | 高度: | 大小: 28 KiB |
二進制
public/images/scores/att-6.png
可執行檔
|
之後 寬度: | 高度: | 大小: 29 KiB |
二進制
public/images/scores/att-7.png
可執行檔
|
之後 寬度: | 高度: | 大小: 26 KiB |
二進制
public/images/scores/att-8.png
可執行檔
|
之後 寬度: | 高度: | 大小: 30 KiB |
二進制
public/images/scores/att-9.png
可執行檔
|
之後 寬度: | 高度: | 大小: 29 KiB |
二進制
public/images/scores/def-5.png
可執行檔
|
之後 寬度: | 高度: | 大小: 38 KiB |
二進制
public/images/scores/def-6.png
可執行檔
|
之後 寬度: | 高度: | 大小: 40 KiB |
二進制
public/images/scores/def-7.png
可執行檔
|
之後 寬度: | 高度: | 大小: 38 KiB |
二進制
public/images/scores/def-8.png
可執行檔
|
之後 寬度: | 高度: | 大小: 41 KiB |
二進制
public/images/scores/def-9.png
可執行檔
|
之後 寬度: | 高度: | 大小: 39 KiB |
二進制
public/images/scores/pow-5.png
可執行檔
|
之後 寬度: | 高度: | 大小: 25 KiB |
二進制
public/images/scores/pow-6.png
可執行檔
|
之後 寬度: | 高度: | 大小: 27 KiB |
二進制
public/images/scores/pow-7.png
可執行檔
|
之後 寬度: | 高度: | 大小: 24 KiB |
二進制
public/images/scores/pow-8.png
可執行檔
|
之後 寬度: | 高度: | 大小: 27 KiB |
二進制
public/images/scores/pow-9.png
可執行檔
|
之後 寬度: | 高度: | 大小: 26 KiB |
|
之後 寬度: | 高度: | 大小: 15 KiB |
|
之後 寬度: | 高度: | 大小: 14 KiB |
|
之後 寬度: | 高度: | 大小: 18 KiB |
|
之後 寬度: | 高度: | 大小: 14 KiB |
|
之後 寬度: | 高度: | 大小: 10 KiB |
|
之後 寬度: | 高度: | 大小: 13 KiB |
|
之後 寬度: | 高度: | 大小: 13 KiB |
|
之後 寬度: | 高度: | 大小: 13 KiB |
|
之後 寬度: | 高度: | 大小: 14 KiB |
|
之後 寬度: | 高度: | 大小: 14 KiB |
|
之後 寬度: | 高度: | 大小: 14 KiB |
|
之後 寬度: | 高度: | 大小: 15 KiB |
|
之後 寬度: | 高度: | 大小: 15 KiB |
|
之後 寬度: | 高度: | 大小: 14 KiB |
|
之後 寬度: | 高度: | 大小: 16 KiB |
|
之後 寬度: | 高度: | 大小: 13 KiB |
|
之後 寬度: | 高度: | 大小: 12 KiB |
二進制
public/images/thumb/s01c13_amun.jpg
一般檔案
|
之後 寬度: | 高度: | 大小: 13 KiB |
|
之後 寬度: | 高度: | 大小: 15 KiB |
|
之後 寬度: | 高度: | 大小: 11 KiB |
二進制
public/images/thumb/s01c16_horus.jpg
一般檔案
|
之後 寬度: | 高度: | 大小: 14 KiB |
二進制
public/images/thumb/s01c17_isis.jpg
一般檔案
|
之後 寬度: | 高度: | 大小: 15 KiB |
|
之後 寬度: | 高度: | 大小: 19 KiB |
|
之後 寬度: | 高度: | 大小: 14 KiB |
|
之後 寬度: | 高度: | 大小: 18 KiB |
二進制
public/images/thumb/s01c19_ra.jpg
一般檔案
|
之後 寬度: | 高度: | 大小: 14 KiB |
|
之後 寬度: | 高度: | 大小: 18 KiB |
二進制
public/images/thumb/s01c20_seker.jpg
一般檔案
|
之後 寬度: | 高度: | 大小: 14 KiB |
|
之後 寬度: | 高度: | 大小: 18 KiB |
|
之後 寬度: | 高度: | 大小: 13 KiB |
|
之後 寬度: | 高度: | 大小: 16 KiB |
二進制
public/images/thumb/s01c22_set.jpg
一般檔案
|
之後 寬度: | 高度: | 大小: 13 KiB |
|
之後 寬度: | 高度: | 大小: 17 KiB |
|
之後 寬度: | 高度: | 大小: 13 KiB |
|
之後 寬度: | 高度: | 大小: 16 KiB |
|
之後 寬度: | 高度: | 大小: 11 KiB |
|
之後 寬度: | 高度: | 大小: 14 KiB |
|
之後 寬度: | 高度: | 大小: 11 KiB |
|
之後 寬度: | 高度: | 大小: 14 KiB |
|
之後 寬度: | 高度: | 大小: 13 KiB |
|
之後 寬度: | 高度: | 大小: 17 KiB |
二進制
public/images/thumb/s01c27_ares.jpg
一般檔案
|
之後 寬度: | 高度: | 大小: 11 KiB |
|
之後 寬度: | 高度: | 大小: 13 KiB |
|
之後 寬度: | 高度: | 大小: 12 KiB |
|
之後 寬度: | 高度: | 大小: 15 KiB |
|
之後 寬度: | 高度: | 大小: 13 KiB |
|
之後 寬度: | 高度: | 大小: 16 KiB |
|
之後 寬度: | 高度: | 大小: 14 KiB |
|
之後 寬度: | 高度: | 大小: 17 KiB |
|
之後 寬度: | 高度: | 大小: 11 KiB |
|
之後 寬度: | 高度: | 大小: 14 KiB |
二進制
public/images/thumb/s01c32_hera.jpg
一般檔案
|
之後 寬度: | 高度: | 大小: 12 KiB |
|
之後 寬度: | 高度: | 大小: 16 KiB |
|
之後 寬度: | 高度: | 大小: 11 KiB |
|
之後 寬度: | 高度: | 大小: 14 KiB |
|
之後 寬度: | 高度: | 大小: 13 KiB |
|
之後 寬度: | 高度: | 大小: 16 KiB |
|
之後 寬度: | 高度: | 大小: 12 KiB |
|
之後 寬度: | 高度: | 大小: 15 KiB |
二進制
public/images/thumb/s01c36_zeus.jpg
一般檔案
|
之後 寬度: | 高度: | 大小: 13 KiB |
|
之後 寬度: | 高度: | 大小: 16 KiB |
|
之後 寬度: | 高度: | 大小: 16 KiB |
|
之後 寬度: | 高度: | 大小: 21 KiB |
|
之後 寬度: | 高度: | 大小: 13 KiB |