add in port and memcache cl vars

This commit is contained in:
iamBadgers
2025-06-01 22:16:05 -07:00
parent 66eb266dd3
commit 1dae591ad5
2 changed files with 21 additions and 2 deletions

View File

@@ -13,9 +13,14 @@ var Memcached = require('memcached')
const app = express()
const jsonParser = json()
const port = 3001
const port = process.argv[process.argv.indexOf('-p')]
? process.argv[process.argv.indexOf('-p') + 1]
: 3001
const memcache_addr = process.argv[process.argv.indexOf('-m')]
? process.argv[process.argv.indexOf('-m') + 1]
: 'localhost:11211'
// const memcache = new memcached('localhost:11211', {})
const memcachep = new Memcache('localhost:11211')
const memcachep = new Memcache(memcache_addr)
addGameApis(app, jsonParser, memcachep)
addCharacterApis(app, jsonParser, memcachep)