@@ -5,8 +5,7 @@ | |||
"env": { | |||
"es6": true, | |||
"node": true, | |||
"jest": true | |||
"node": true | |||
}, | |||
"plugins": [ | |||
@@ -51,12 +50,15 @@ | |||
"window": false, | |||
"XMLHttpRequest": false, | |||
"pit": false, | |||
"extend": true, | |||
"_": true, | |||
"io": true, | |||
"cons": true, | |||
"atlas": true, | |||
"instancer": true | |||
"extend": false, | |||
"_": false, | |||
"io": false, | |||
"cons": false, | |||
"atlas": false, | |||
"instancer": false, | |||
"leaderboard": false, | |||
"clientConfig": false | |||
}, | |||
"rules": { | |||
@@ -1,8 +1,6 @@ | |||
let bcrypt = require('bcrypt-nodejs'); | |||
let io = require('../security/io'); | |||
let messages = require('../misc/messages'); | |||
let connections = require('../security/connections'); | |||
let leaderboard = require('../leaderboard/leaderboard'); | |||
let skins = require('../config/skins'); | |||
let roles = require('../config/roles'); | |||
let profanities = require('../misc/profanities'); | |||
@@ -364,9 +362,11 @@ module.exports = { | |||
onLogin: function (msg, storedPassword, err, compareResult) { | |||
if (!storedPassword) | |||
msg.callback(messages.login.incorrect); | |||
else if (compareResult) { //If stored password matches the hashed password entered by the user, log them in directly | |||
else if (compareResult) { | |||
//If stored password matches the hashed password entered by the user, log them in directly | |||
this.onLoginVerified(msg); | |||
} else if (msg.data.password === storedPassword) { //If the stored password matches a plaintext password entered by the user; In that case the password gets hashed for the future | |||
} else if (msg.data.password === storedPassword) { | |||
//If the stored password matches a plaintext password entered by the user; In that case the password gets hashed for the future | |||
this.onUnhashedLogin(msg); | |||
} else | |||
msg.callback(messages.login.incorrect); | |||
@@ -55,6 +55,8 @@ module.exports = { | |||
}, | |||
getState: function (sourceObj, state) { | |||
let result = null; | |||
state = state || 1; | |||
//Goto? | |||
@@ -93,7 +95,7 @@ module.exports = { | |||
let cpn = sourceObj[stateConfig.cpn]; | |||
let newArgs = extend(true, [], stateConfig.args); | |||
newArgs.push(this.obj); | |||
let result = cpn[stateConfig.method].apply(cpn, newArgs); | |||
result = cpn[stateConfig.method].apply(cpn, newArgs); | |||
if (stateConfig.goto) { | |||
if (result) | |||
@@ -116,7 +118,7 @@ module.exports = { | |||
return; | |||
} | |||
let result = { | |||
result = { | |||
id: this.obj.id, | |||
msg: null, | |||
from: this.obj.name, | |||
@@ -38,8 +38,8 @@ module.exports = { | |||
let e = { | |||
type: 'effects', | |||
effects: this.effects | |||
.map(e => e.save()) | |||
.filter(e => e != null) | |||
.map(f => f.save()) | |||
.filter(f => f != null) | |||
}; | |||
return e; | |||
@@ -53,8 +53,8 @@ module.exports = { | |||
let effects = this.effects; | |||
if ((effects.length > 0) && (effects[0].obj)) { | |||
effects = effects | |||
.map(e => e.simplify()) | |||
.filter(e => e != null); | |||
.map(f => f.simplify()) | |||
.filter(f => f != null); | |||
} | |||
e.effects = effects; | |||
@@ -64,17 +64,17 @@ module.exports = { | |||
if (!slot) | |||
slot = item.equipSlot || item.slot; | |||
if (slot === 'twoHanded') { | |||
let currentEqId = this.eq.offHand; | |||
if (currentEqId != null) | |||
this.unequip(currentEqId); | |||
let offHandEqId = this.eq.offHand; | |||
if (offHandEqId != null) | |||
this.unequip(offHandEqId); | |||
slot = 'oneHanded'; | |||
} else if (slot === 'offHand') { | |||
let currentEqId = this.eq.oneHanded; | |||
if (currentEqId != null) { | |||
let currentEq = this.obj.inventory.findItem(currentEqId); | |||
if ((currentEq != null) && (currentEq.slot === 'twoHanded')) | |||
this.unequip(currentEqId); | |||
let oneHandedEqId = this.eq.oneHanded; | |||
if (oneHandedEqId != null) { | |||
let oneHandedEq = this.obj.inventory.findItem(oneHandedEqId); | |||
if (oneHandedEq && oneHandedEq.slot === 'twoHanded') | |||
this.unequip(oneHandedEqId); | |||
} | |||
} | |||
@@ -1,9 +1,7 @@ | |||
let roles = require('../../config/roles'); | |||
let atlas = require('../../world/atlas'); | |||
let generator = require('../../items/generator'); | |||
let random = require('../../misc/random'); | |||
let configSlots = require('../../items/config/slots'); | |||
let io = require('../../security/io'); | |||
let factions = require('../../config/factions'); | |||
let connections = require('../../security/connections'); | |||
@@ -78,8 +76,8 @@ module.exports = { | |||
} | |||
if (localCommands.indexOf(actionName) > -1) | |||
this[actionName].call(this, config); | |||
else { | |||
this[actionName](config); | |||
else { | |||
atlas.performAction(this.obj, { | |||
cpn: 'social', | |||
method: actionName, | |||
@@ -197,7 +195,7 @@ module.exports = { | |||
if (target === this.obj.name) | |||
return; | |||
let o = connections.players.find(o => (o.name === target)); | |||
let o = connections.players.find(f => (f.name === target)); | |||
if (!o) | |||
return; | |||
@@ -248,7 +246,7 @@ module.exports = { | |||
if (target === this.obj.name) | |||
return; | |||
let o = connections.players.find(o => (o.name === target)); | |||
let o = connections.players.find(f => (f.name === target)); | |||
if (!o) | |||
return; | |||
@@ -332,7 +330,7 @@ module.exports = { | |||
let spritesheet = config.spritesheet; | |||
delete config.spritesheet; | |||
let factions = (config.factions || '').split(','); | |||
let factionList = (config.factions || '').split(','); | |||
delete config.factions; | |||
let safe = config.safe; | |||
@@ -349,7 +347,7 @@ module.exports = { | |||
item.noSalvage = true; | |||
} | |||
factions.forEach(function (f) { | |||
factionList.forEach(function (f) { | |||
if (f === '') | |||
return; | |||
@@ -447,7 +447,6 @@ module.exports = { | |||
delete item.pos; | |||
let io = require('../security/io'); | |||
io.get({ | |||
ent: msg.recipient, | |||
field: 'character', | |||
@@ -49,13 +49,12 @@ module.exports = { | |||
} | |||
if (!this.goHome) { | |||
//Are we in fight mode? | |||
if ((target) && (target !== obj) && ((!obj.follower) || (obj.follower.master !== target))) { | |||
//Are we in fight mode? | |||
this.fight(target); | |||
return; | |||
} | |||
//Is fight mode over? | |||
else if ((!target) && (this.target)) { | |||
} else if ((!target) && (this.target)) { | |||
//Is fight mode over? | |||
this.target = null; | |||
obj.clearQueue(); | |||
this.goHome = true; | |||
@@ -28,18 +28,20 @@ module.exports = { | |||
if (!action) | |||
return; | |||
let cpn = null; | |||
if (action.targetId) { | |||
let target = this.obj.instance.objects.find(o => o.id === action.targetId); | |||
if (target) { | |||
let cpn = target[action.cpn]; | |||
cpn = target[action.cpn]; | |||
if ((cpn) && (cpn[action.method])) | |||
cpn[action.method].call(cpn, obj, action.args); | |||
cpn[action.method](cpn, obj, action.args); | |||
} | |||
return; | |||
} | |||
let cpn = obj[action.cpn]; | |||
cpn = obj[action.cpn]; | |||
if ((cpn) && (cpn[action.method])) | |||
cpn[action.method].apply(cpn, action.args); | |||
}, | |||
@@ -1,4 +1,3 @@ | |||
let atlas = require('../world/atlas'); | |||
let classes = require('../config/spirits'); | |||
let roles = require('../config/roles'); | |||
let serverConfig = require('../config/serverConfig'); | |||
@@ -7,7 +7,7 @@ module.exports = { | |||
(blueprint.list || []).forEach(function (p) { | |||
let template = null; | |||
try { | |||
let template = require('../config/prophecies/' + p); | |||
template = require('../config/prophecies/' + p); | |||
} catch (e) { | |||
console.log(e); | |||
} | |||
@@ -61,10 +61,10 @@ module.exports = { | |||
}, | |||
canEquipItem: function (item) { | |||
let factions = item.factions; | |||
let fLen = factions.length; | |||
let itemFactions = item.factions; | |||
let fLen = itemFactions.length; | |||
for (let i = 0; i < fLen; i++) { | |||
let f = factions[i]; | |||
let f = itemFactions[i]; | |||
if (this.getTier(f.id) < f.tier) | |||
return false; | |||
} | |||
@@ -209,7 +209,7 @@ module.exports = { | |||
}, | |||
syncFaction: function (factionId, full) { | |||
let l = this.list.find(l => (l.id === factionId)); | |||
let l = this.list.find(f => (f.id === factionId)); | |||
let faction = { | |||
id: factionId, | |||
rep: l.rep, | |||
@@ -1,4 +1,3 @@ | |||
let atlas = require('../world/atlas'); | |||
let roles = require('../config/roles'); | |||
let events = require('../misc/events'); | |||
@@ -221,9 +220,9 @@ module.exports = { | |||
}); | |||
} else if (messageString[0] === '$') | |||
this.sendCustomChannelMessage(msg); | |||
else if (messageString[0] === '%') | |||
else if (messageString[0] === '%') | |||
this.sendPartyMessage(msg); | |||
else { | |||
else { | |||
let prefix = roles.getRoleMessagePrefix(this.obj) || ''; | |||
cons.emit('event', { | |||
@@ -295,10 +294,10 @@ module.exports = { | |||
player.social.party = this.party; | |||
player.social.updatePartyOnThread(); | |||
let msg = source.name + ' has joined the party'; | |||
let returnMsg = source.name + ' has joined the party'; | |||
if (p === sourceId) | |||
msg = 'you have joined a party'; | |||
player.social.sendMessage(msg, 'color-yellowB'); | |||
returnMsg = 'you have joined a party'; | |||
player.social.sendMessage(returnMsg, 'color-yellowB'); | |||
player | |||
.socket.emit('event', { | |||
@@ -372,15 +371,15 @@ module.exports = { | |||
let newLeader = cons.players.find(c => c.id === this.party[0]).social; | |||
newLeader.isPartyLeader = true; | |||
this.party.forEach(function (p) { | |||
let msg = newLeader.obj.name + ' is now the party leader'; | |||
let returnMsg = newLeader.obj.name + ' is now the party leader'; | |||
if (p === newLeader.obj.id) | |||
msg = 'you are now the party leader'; | |||
returnMsg = 'you are now the party leader'; | |||
cons.players.find(c => c.id === p).socket.emit('events', { | |||
onGetMessages: [{ | |||
messages: [{ | |||
class: 'q0', | |||
message: msg | |||
message: returnMsg | |||
}] | |||
}] | |||
}); | |||
@@ -64,7 +64,7 @@ module.exports = { | |||
let spells = this.spells; | |||
if ((spells.length > 0) && (spells[0].obj)) | |||
spells = spells.map(s => s.simplify()); | |||
spells = spells.map(f => f.simplify()); | |||
s.spells = spells; | |||
@@ -211,7 +211,8 @@ module.exports = { | |||
this.obj.stats.addStat('manaReservePercent', -reserve.percentage); | |||
} | |||
exists.unlearn && exists.unlearn(); | |||
if (exists.unlearn) | |||
exists.unlearn(); | |||
this.obj.syncer.setArray(true, 'spellbook', 'removeSpells', id); | |||
this.auto.spliceWhere(a => a.spell === id); | |||
@@ -521,7 +522,7 @@ module.exports = { | |||
} | |||
}, | |||
sendAnnouncement: function (msg, global) { | |||
sendAnnouncement: function (msg) { | |||
process.send({ | |||
method: 'events', | |||
data: { | |||
@@ -208,7 +208,7 @@ module.exports = { | |||
this.addStat(morphStat, value); | |||
} else if (stat === 'vit') | |||
this.addStat('hpMax', (value * this.statScales.vitToHp)); | |||
else if (stat === 'allAttributes') { | |||
else if (stat === 'allAttributes') { | |||
['int', 'str', 'dex'].forEach(function (s) { | |||
this.addStat(s, value); | |||
}, this); | |||
@@ -705,7 +705,7 @@ module.exports = { | |||
let time = scheduler.getTime(); | |||
if (!lootStats) | |||
this.stats.lootStats[mob.name] = time; | |||
else | |||
else | |||
return ((lootStats.day !== time.day), (lootStats.month !== time.month)); | |||
}, | |||
@@ -6,7 +6,7 @@ module.exports = { | |||
type: 'trade', | |||
items: [], | |||
buyback: {}, | |||
buybackList: {}, | |||
maxBuyback: 10, | |||
@@ -99,7 +99,7 @@ module.exports = { | |||
let markup = target.trade.markup.sell; | |||
if (msg.action === 'buyback') { | |||
itemList = target.trade.buyback[this.obj.name] || []; | |||
itemList = target.trade.buybackList[this.obj.name] || []; | |||
markup = target.trade.markup.buy; | |||
} | |||
@@ -262,14 +262,14 @@ module.exports = { | |||
this.obj.syncer.set(true, 'trade', 'gold', this.gold); | |||
this.obj.syncer.setArray(true, 'trade', 'removeItems', item.id); | |||
let buyback = this.buyback; | |||
let buybackList = this.buybackList; | |||
let name = this.obj.name; | |||
if (!buyback[name]) | |||
buyback[name] = []; | |||
if (!buybackList[name]) | |||
buybackList[name] = []; | |||
buyback[name].push(item); | |||
if (buyback[name].length > this.maxBuyback) | |||
buyback[name].splice(0, 1); | |||
buybackList[name].push(item); | |||
if (buybackList[name].length > this.maxBuyback) | |||
buybackList[name].splice(0, 1); | |||
}, | |||
startSell: function (msg) { | |||
@@ -334,7 +334,7 @@ module.exports = { | |||
}, | |||
removeBuyback: function (itemId, name) { | |||
return (this.buyback[name] || []).spliceFirstWhere(i => i.id === itemId); | |||
return (this.buybackList[name] || []).spliceFirstWhere(i => i.id === itemId); | |||
}, | |||
getItems: function (requestedBy) { | |||
@@ -376,7 +376,7 @@ module.exports = { | |||
}, | |||
findBuyback: function (itemId, sourceName) { | |||
return (this.buyback[sourceName] || []).find(i => i.id === itemId); | |||
return (this.buybackList[sourceName] || []).find(i => i.id === itemId); | |||
}, | |||
resolveCallback: function (msg, result) { | |||
@@ -114,10 +114,10 @@ module.exports = { | |||
}); | |||
}, | |||
onGetSkins: function (obj, skins) { | |||
onGetSkins: function (obj, result) { | |||
this.obj.instance.syncer.queue('onGetWardrobeSkins', { | |||
id: this.obj.id, | |||
skins: skins | |||
skins: result | |||
}, [obj.serverId]); | |||
} | |||
}; |
@@ -103,7 +103,7 @@ module.exports = { | |||
let sendRecipe = extend(true, {}, recipe); | |||
(sendRecipe.materials || []).forEach(function (m) { | |||
m.need = !items.some(i => (i.name === m.name && (m.quantity == 1 || i.quantity >= m.quantity))); | |||
m.need = !items.some(i => (i.name === m.name && (m.quantity === 1 || i.quantity >= m.quantity))); | |||
}); | |||
this.resolveCallback(msg, sendRecipe); | |||
@@ -119,7 +119,7 @@ module.exports = { | |||
return; | |||
const items = obj.inventory.items; | |||
let canCraft = recipe.materials.every(m => (items.some(i => i.name == m.name && (m.quantity == 1 || i.quantity >= m.quantity)))); | |||
let canCraft = recipe.materials.every(m => (items.some(i => i.name === m.name && (m.quantity === 1 || i.quantity >= m.quantity)))); | |||
if (!canCraft) | |||
return; | |||
@@ -59,19 +59,19 @@ module.exports = { | |||
if (roll >= effect.properties.chance) | |||
return; | |||
let cbExplode = function (target) { | |||
if ((this.destroyed) || (target.destroyed)) | |||
let cbExplode = function (boundTarget) { | |||
if ((this.destroyed) || (boundTarget.destroyed)) | |||
return; | |||
let damage = combat.getDamage({ | |||
let damageConfig = combat.getDamage({ | |||
source: this, | |||
target: target, | |||
target: boundTarget, | |||
damage: item.level * 5, | |||
element: 'arcane', | |||
noCrit: true | |||
}); | |||
target.stats.takeDamage(damage, 1, this); | |||
boundTarget.stats.takeDamage(damageConfig, 1, this); | |||
}; | |||
this.instance.syncer.queue('onGetObject', { | |||
@@ -32,9 +32,8 @@ module.exports = { | |||
}; | |||
item.effects.push(result); | |||
} | |||
//This is a hack for items that were never generated properly | |||
else if (!result.chance) { | |||
} else if (!result.chance) { | |||
//This is a hack for items that were never generated properly | |||
result.chance = chanceRoll; | |||
result.text = chanceRoll + '% chance on kill to summon a critter to assist you in battle'; | |||
} | |||
@@ -95,9 +95,6 @@ module.exports = { | |||
'crystal whelk': { | |||
level: 16, | |||
spells: [{ | |||
type: 'melee' | |||
}], | |||
regular: { | |||
drops: { | |||
@@ -21,16 +21,6 @@ module.exports = { | |||
count: 0 | |||
} | |||
}, | |||
'royal guard': { | |||
level: 50, | |||
deathRep: -15, | |||
walkDistance: 0, | |||
rare: { | |||
count: 0 | |||
} | |||
}, | |||
princess: { | |||
level: 100, | |||
deathRep: -50, | |||
@@ -108,48 +108,48 @@ module.exports = { | |||
} | |||
}, | |||
estrid: { | |||
'1': { | |||
1: { | |||
msg: [{ | |||
msg: `Is there anything I can help you with today?`, | |||
msg: 'Is there anything I can help you with today?', | |||
options: [1.1, 1.2, 1.3, 1.4, 1.5] | |||
}], | |||
options: { | |||
'1.1': { | |||
msg: `How long have you been working here?`, | |||
1.1: { | |||
msg: 'How long have you been working here?', | |||
goto: 2 | |||
}, | |||
'1.3': { | |||
msg: `I'd like to browse your wares.`, | |||
1.3: { | |||
msg: 'I\'d like to browse your wares.', | |||
goto: 'tradeBuy' | |||
}, | |||
'1.4': { | |||
msg: `I have some items to sell`, | |||
1.4: { | |||
msg: 'I have some items to sell', | |||
goto: 'tradeSell' | |||
}, | |||
'1.5': { | |||
msg: `I want to buy something back`, | |||
1.5: { | |||
msg: 'I want to buy something back', | |||
goto: 'tradeBuyback' | |||
} | |||
} | |||
}, | |||
'2': { | |||
msg: `I haven't been working here long, but I was born and raised here by my mother. She ran the shop before me.`, | |||
2: { | |||
msg: 'I haven\'t been working here long, but I was born and raised here by my mother. She ran the shop before me.', | |||
options: { | |||
'2.1': { | |||
msg: `Where is your mother now?`, | |||
2.1: { | |||
msg: 'Where is your mother now?', | |||
goto: '2-1' | |||
}, | |||
'2.2': { | |||
msg: `I'd like to ask something else.`, | |||
2.2: { | |||
msg: 'I\'d like to ask something else.', | |||
goto: 1 | |||
} | |||
} | |||
}, | |||
'2-1': { | |||
msg: `A few months ago, she...took ill. She's been bedridden upstairs ever since.`, | |||
msg: 'A few months ago, she...took ill. She\'s been bedridden upstairs ever since.', | |||
options: { | |||
'2-1.1': { | |||
msg: `I'd like to ask something else.`, | |||
msg: 'I\'d like to ask something else.', | |||
goto: 1 | |||
} | |||
} | |||
@@ -66,25 +66,6 @@ module.exports = { | |||
} | |||
} | |||
}, | |||
shopestrid: { | |||
properties: { | |||
cpnNotice: { | |||
actions: { | |||
enter: { | |||
cpn: 'dialogue', | |||
method: 'talk', | |||
args: [{ | |||
targetName: 'estrid' | |||
}] | |||
}, | |||
exit: { | |||
cpn: 'dialogue', | |||
method: 'stopTalk' | |||
} | |||
} | |||
} | |||
} | |||
}, | |||
shopvikar: { | |||
properties: { | |||
cpnNotice: { | |||
@@ -22,7 +22,7 @@ module.exports = { | |||
.map(r => r.item.name); | |||
}, | |||
getRecipe: function(type, name) { | |||
return (recipes[type] || []).find(r => r.item.name == name); | |||
getRecipe: function (type, name) { | |||
return (recipes[type] || []).find(r => r.item.name === name); | |||
} | |||
}; |
@@ -148,15 +148,10 @@ module.exports = { | |||
}, | |||
cast: function (action) { | |||
while (true) { | |||
do { | |||
this.targetX = action.target.x + ~~(Math.random() * 6) - 3; | |||
this.targetY = action.target.y + ~~(Math.random() * 6) - 3; | |||
if (this.obj.instance.physics.isTileBlocking(this.targetX, this.targetY)) | |||
continue; | |||
else | |||
break; | |||
} | |||
} while (this.obj.instance.physics.isTileBlocking(this.targetX, this.targetY)); | |||
this.currentX = this.obj.x; | |||
this.currentY = this.obj.y; | |||
@@ -1,21 +1,11 @@ | |||
let extend = require('extend'); | |||
let cons = require('./security/connections'); | |||
let helpers = require('./misc/helpers'); | |||
let atlas = require('./world/atlas'); | |||
let leaderboard = require('./leaderboard/leaderboard'); | |||
let clientConfig = require('./config/clientConfig'); | |||
/* global io, extend, cons, _, atlas, leaderboard, clientConfig */ | |||
module.exports = { | |||
init: function () { | |||
global.io = require('./security/io'); | |||
global.extend = require('extend'); | |||
global.cons = require('./security/connections'); | |||
global._ = require('./misc/helpers'); | |||
global.atlas = require('./world/atlas'); | |||
global.leaderboard = require('./leaderboard/leaderboard'); | |||
global.clientConfig = require('./config/clientConfig'); | |||
global.io = require('./security/io'); | |||
global.extend = require('extend'); | |||
global.cons = require('./security/connections'); | |||
global._ = require('./misc/helpers'); | |||
global.atlas = require('./world/atlas'); | |||
global.leaderboard = require('./leaderboard/leaderboard'); | |||
global.clientConfig = require('./config/clientConfig'); | |||
clientConfig.init(); | |||
} | |||
}; | |||
clientConfig.init(); |
@@ -1,9 +1,6 @@ | |||
let globals = require('./globals'); | |||
let server = require('./server'); | |||
let atlas = require('./world/atlas'); | |||
let components = require('./components/components'); | |||
let leaderboard = require('./leaderboard/leaderboard'); | |||
let io = require('./security/io'); | |||
let mods = require('./misc/mods'); | |||
let mtx = require('./mtx/mtx'); | |||
let animations = require('./config/animations'); | |||
@@ -33,7 +30,6 @@ let startup = { | |||
}, | |||
onModsLoaded: function () { | |||
globals.init(); | |||
classes.init(); | |||
spellsConfig.init(); | |||
spells.init(); | |||
@@ -1,5 +1,4 @@ | |||
let objBase = require('./objBase'); | |||
let leaderboard = require('../leaderboard/leaderboard'); | |||
module.exports = { | |||
nextId: 0, | |||
@@ -5,9 +5,9 @@ module.exports = { | |||
init: function (callback) { | |||
let app = require('express')(); | |||
let server = require('http').createServer(app); | |||
let io = require('socket.io')(server); | |||
let socketServer = require('socket.io')(server); | |||
global.cons.sockets = io.sockets; | |||
global.cons.sockets = socketServer.sockets; | |||
app.use(function (req, res, next) { | |||
if ((req.url.indexOf('/server') !== 0) && (req.url.indexOf('/mods') !== 0)) | |||
@@ -27,7 +27,7 @@ module.exports = { | |||
app.get('/', this.requests.root.bind(this)); | |||
app.get(/^(.*)$/, this.requests.default.bind(this)); | |||
io.on('connection', this.listeners.onConnection.bind(this)); | |||
socketServer.on('connection', this.listeners.onConnection.bind(this)); | |||
let port = process.env.PORT || config.port || 4000; | |||
server.listen(port, function () { | |||
@@ -73,10 +73,6 @@ module.exports = { | |||
}, | |||
requests: { | |||
root: function (req, res) { | |||
//let ip = req.headers['x-forwarded-for'] || req.connection.remoteAddress; | |||
//if (ip !== '::1') | |||
// return; | |||
res.sendFile('index.html'); | |||
}, | |||
default: function (req, res) { | |||