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)
|
||||
|
||||
@@ -1,5 +1,19 @@
|
||||
version: "3"
|
||||
|
||||
networks:
|
||||
cprush-net:
|
||||
external: false
|
||||
|
||||
services:
|
||||
cprush:
|
||||
image: potato
|
||||
networks:
|
||||
- cprush-net
|
||||
ports:
|
||||
- 3001:3001
|
||||
depends_on:
|
||||
- memcache
|
||||
memcache:
|
||||
image: memcached
|
||||
networks:
|
||||
- cprush-net
|
||||
Reference in New Issue
Block a user