From 12d46f353fc774ff5b38a96e95bb98872b0e682a Mon Sep 17 00:00:00 2001 From: strawmanbobi Date: Sun, 4 Dec 2016 20:58:19 +0800 Subject: [PATCH] removed unused component from moni_poem --- .../configuration/system_configs.js | 25 +++++----- .../mini_poem/configuration/constants.js | 46 +++++-------------- 2 files changed, 24 insertions(+), 47 deletions(-) diff --git a/src/web_console/configuration/system_configs.js b/src/web_console/configuration/system_configs.js index 72dd1ab..c024396 100644 --- a/src/web_console/configuration/system_configs.js +++ b/src/web_console/configuration/system_configs.js @@ -1,12 +1,16 @@ +//noinspection JSUnresolvedFunction /** * Created by strawmanbobi * 2014-10-17 */ +//noinspection JSUnresolvedFunction require('../mini_poem/configuration/constants'); +//noinspection JSUnresolvedFunction var Enums = require('./../constants/enums'); var enums = new Enums(); +//noinspection JSUnresolvedVariable exports.setupEnvironment = function () { var env = process.env.NODE_ENV || 'development'; ENV = env; @@ -18,13 +22,12 @@ exports.setupEnvironment = function () { FILE_TEMP_PATH = "~/home/strawmanbobi/rc_extension"; PYTHON_PATH = "/usr/bin/python"; LISTEN_PORT = "8300"; - MAIN_SERVER_ADDRESS = "localhost"; - MAIN_SERVER_PORT = 80; + SERVER_ADDRESS = "localhost"; REDIS_HOST = "localhost"; REDIS_PORT = "6379"; REDIS_PASSWORD = ""; - PRIMARY_SERVER_ADDRESS = "irext.net" - PRIMARY_SERVER_PORT = "80" + EXTERNAL_SERVER_ADDRESS = "irext.net" + EXTERNAL_SERVER_PORT = "80" } else if (enums.APP_DEVELOPMENT_MODE == env) { MYSQL_DB_SERVER_ADDRESS = "localhost"; MYSQL_DB_NAME = "irext"; @@ -33,13 +36,12 @@ exports.setupEnvironment = function () { FILE_TEMP_PATH = "D:/rc_extension"; PYTHON_PATH = "C:/Python27/python.exe"; LISTEN_PORT = "8300"; - MAIN_SERVER_ADDRESS = "localhost"; - MAIN_SERVER_PORT = 80; + SERVER_ADDRESS = "localhost"; REDIS_HOST = "localhost"; REDIS_PORT = "6379"; REDIS_PASSWORD = ""; - PRIMARY_SERVER_ADDRESS = "irext.net" - PRIMARY_SERVER_PORT = "80" + EXTERNAL_SERVER_ADDRESS = "irext.net" + EXTERNAL_SERVER_PORT = "80" } else if (enums.APP_USERDEBUG_MODE == env) { MYSQL_DB_SERVER_ADDRESS = "localhost"; MYSQL_DB_NAME = "irext"; @@ -48,12 +50,11 @@ exports.setupEnvironment = function () { FILE_TEMP_PATH = "D:/rc_extension"; PYTHON_PATH = "/usr/bin/python"; LISTEN_PORT = "8300"; - MAIN_SERVER_ADDRESS = "localhost"; - MAIN_SERVER_PORT = 80; + SERVER_ADDRESS = "localhost"; REDIS_HOST = "localhost"; REDIS_PORT = "6379"; REDIS_PASSWORD = ""; - PRIMARY_SERVER_ADDRESS = "irext.net" - PRIMARY_SERVER_PORT = "80" + EXTERNAL_SERVER_ADDRESS = "irext.net" + EXTERNAL_SERVER_PORT = "80" } }; \ No newline at end of file diff --git a/src/web_console/mini_poem/configuration/constants.js b/src/web_console/mini_poem/configuration/constants.js index e5d0383..10ed02c 100644 --- a/src/web_console/mini_poem/configuration/constants.js +++ b/src/web_console/mini_poem/configuration/constants.js @@ -10,8 +10,10 @@ global.ICODE = "PoEM~ V0.0.4"; // runtime environment global.ENV = "dev"; -global.SERVER = 0; -global.LISTEN_PORT = "80"; + +// generic server configuration +global.LISTEN_PORT = "8080"; +global.SERVER_ADDRESS = "127.0.0.1"; // local environment global.FILE_TEMP_PATH = ""; @@ -22,42 +24,16 @@ global.MYSQL_DB_NAME = "default_db"; global.MYSQL_DB_USER = "root"; global.MYSQL_DB_PASSWORD = "root"; -// db : MongoDB -global.MONGO_DB_URI = ""; -global.MONGO_DB_SERVER_ADDRESS = "127.0.0.1"; -global.MONGO_DB_NAME = "default_db"; -global.MONGO_DB_USER = null; -global.MONGO_DB_PASSWORD = null; - -// cache : memcached -global.MEMCACHED_HOST = ""; -global.MEMCACHED_PORT = ""; -global.MEMCACHED_SASL_USER = ""; -global.MEMCACHED_SASL_PASSWORD = ""; - -// sns : Weixin -global.WEIXIN_APP_ID = ""; -global.WEIXIN_APP_SECRET = ""; -global.WEIXIN_TOKEN = ""; - -// sns : facebook +// cache : redis +global.REDIS_HOST = "localhost"; +global.REDIS_PORT = "6379"; +global.REDIS_PASSWORD = ""; // external : python path global.PYTHON_PATH = ""; -// message : credential -global.PUSH_APP_KEY = ""; -global.PUSH_APP_SECRET = ""; - -// generic server configuration -global.SERVER_LISTEN_PORT = "8080"; -global.SERVER_ADDRESS = "127.0.0.1"; - -// OSS direct download bucket name -global.OSS_DIR_DOWN_PATH = ""; - -// incoming request security configuration -global.APP_ID = ""; -global.APP_TOKEN = ""; +// HTTP request +global.EXTERNAL_SERVER_ADDRESS = "127.0.0.1"; +global.EXTERNAL_SERVER_PORT = "80"; global.TOKEN_TTL = 60;