add in port and memcache cl vars
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user