dygapp 6 år sedan
förälder
incheckning
711f6f6081
8 ändrade filer med 58 tillägg och 21 borttagningar
  1. 1 1
      README.md
  2. 1 1
      README.zh-CN.md
  3. 14 0
      appveyor.yml
  4. 9 2
      config/config.default.js
  5. 18 0
      config/config.local.js
  6. 3 5
      config/config.prod.js
  7. 1 1
      ecosystem.config.js
  8. 11 11
      package.json

+ 1 - 1
README.md

@@ -1,6 +1,6 @@
 # smart-user
 
-smart jobs platform user service
+smart jobs platform cms service
 
 ## QuickStart
 

+ 1 - 1
README.zh-CN.md

@@ -1,6 +1,6 @@
 # smart-user
 
-smart jobs platform user service
+smart jobs platform cms service
 
 ## 快速入门
 

+ 14 - 0
appveyor.yml

@@ -0,0 +1,14 @@
+environment:
+  matrix:
+    - nodejs_version: '8'
+
+install:
+  - ps: Install-Product node $env:nodejs_version
+  - npm i npminstall && node_modules\.bin\npminstall
+
+test_script:
+  - node --version
+  - npm --version
+  - npm run test
+
+build: off

+ 9 - 2
config/config.default.js

@@ -4,10 +4,17 @@ module.exports = appInfo => {
   const config = exports = {};
 
   // use for cookie sign key, should change to your own and keep security
-  config.keys = appInfo.name + '_1517455121740_7922';
+  config.keys = appInfo.name + '_1517455121740_8202';
 
   // add your config here
   // config.middleware = [];
+
+  config.cluster = {
+    listen: {
+      port: 8202,
+    },
+  };
+
   config.errorMongo = {
     details: true,
   };
@@ -17,7 +24,7 @@ module.exports = appInfo => {
 
   // mongoose config
   config.mongoose = {
-    url: 'mongodb://localhost:27017/platform',
+    url: 'mongodb://localhost:27017/cms',
     options: {
       user: 'root',
       pass: 'Ziyouyanfa#@!',

+ 18 - 0
config/config.local.js

@@ -0,0 +1,18 @@
+'use strict';
+
+module.exports = () => {
+  const config = exports = {};
+
+  // mongoose config
+  config.mongoose = {
+    url: 'mongodb://192.168.18.100:27018/cms',
+    // url: 'mongodb://192.168.1.170:27018/cms',
+  };
+
+  config.logger = {
+    level: 'DEBUG',
+    consoleLevel: 'DEBUG',
+  };
+
+  return config;
+};

+ 3 - 5
config/config.prod.js

@@ -3,11 +3,9 @@
 module.exports = () => {
   const config = exports = {};
 
-  // add your config here
-  config.cluster = {
-    listen: {
-      port: 8000,
-    },
+  // mongoose config
+  config.mongoose = {
+    url: 'mongodb://localhost:27018/cms',
   };
 
   config.logger = {

+ 1 - 1
ecosystem.config.js

@@ -1,6 +1,6 @@
 'use strict';
 
-const app = 'service-tmpl';
+const app = 'cms-service';
 module.exports = {
   apps: [{
     name: app, // 应用名称

+ 11 - 11
package.json

@@ -1,23 +1,23 @@
 {
-  "name": "service-template",
+  "name": "cms-service",
   "version": "1.0.0",
-  "description": "smart jobs platform service template",
+  "description": "smart jobs platform cms service",
   "private": true,
   "egg": {
     "framework": "naf-framework-mongoose"
   },
   "dependencies": {
-    "egg": "^2.14.1",
-    "egg-scripts": "^2.10.0",
+    "egg": "^2.20.0",
+    "egg-scripts": "^2.11.0",
     "naf-framework-mongoose": "^0.5.17"
   },
   "devDependencies": {
     "autod": "^3.0.1",
     "autod-egg": "^1.1.0",
-    "egg-bin": "^4.9.0",
-    "egg-ci": "^1.10.0",
-    "egg-mock": "^3.20.1",
-    "eslint": "^5.9.0",
+    "egg-bin": "^4.11.1",
+    "egg-ci": "^1.11.0",
+    "egg-mock": "^3.21.0",
+    "eslint": "^5.15.1",
     "eslint-config-egg": "^7.1.0",
     "eslint-config-egg-naf": "0.0.3",
     "webstorm-disable-index": "^1.2.0"
@@ -26,8 +26,8 @@
     "node": ">=8.9.0"
   },
   "scripts": {
-    "start": "egg-scripts start --daemon --title=service-tmpl",
-    "stop": "egg-scripts stop --title=service-tmpl",
+    "start": "egg-scripts start --daemon --title=cms-service",
+    "stop": "egg-scripts stop --title=cms-service",
     "dev": "egg-bin dev",
     "debug": "egg-bin debug",
     "test": "npm run lint -- --fix && npm run test-local",
@@ -37,7 +37,7 @@
     "ci": "npm run lint && npm run cov",
     "autod": "autod",
     "pm2": "pm2 start",
-    "restart": "pm2 restart service-tmpl"
+    "restart": "pm2 restart cms-service"
   },
   "ci": {
     "version": "8"