New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

zhike-consul

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zhike-consul - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

2

package.json
{
"name": "zhike-consul",
"version": "1.0.1",
"version": "1.0.2",
"description": "a simple consul client",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -8,3 +8,3 @@ # zhike-consul

const Consul = require('zhike-consul');
const configKeys = ['optimus', 'db', 'redis', 'mq'];
const configKeys = ['order', 'mq', 'userService', 'payService'];
const host = '127.0.0.1';

@@ -18,8 +18,14 @@ const port = 8500;

consul.pull().then(function() {
// 3.启动HTTP Server
// 3.构造全局config对象
global.config = Object.assign({},
CFG.order,
{mq: CFG.mq},
{userService: CFG.userService},
{payService: CFG.payService}
);
// 4.启动HTTP Server
let express = require('express');
let app = express();
initRedis(CFG.redis.host, CFG.redis.port);
initDB(CFG.optimus.db);
app.listen(CFG.optimus.port);
let mq = amqplib.connect('amqp://' + config.mq.user + ':' + config.mq.pass + '@' + config.mq.host + ':' + config.mq.port);
app.listen(config.port);
})

@@ -26,0 +32,0 @@ ```

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc