Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

service-geoip

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

service-geoip - npm Package Compare versions

Comparing version 1.3.0 to 1.3.1

4

config.json
{
"amqp": "amqp://V9DB1pifFT2VuhTr2A3s:553HL.z0S9883c[tyl0R@18cf6127-pukoren.node.tutum.io",
"amqp": "amqp://localhost",
"queue": "geo:ip",
"port": 8080
}
}

@@ -33,18 +33,26 @@ var fs = require('fs'),

reqs++;
console.log(' [.] Answered', location);
}
amqp.connect(process.env.AMQP_SRV || config.amqp).then(function(_conn) {
conn = _conn;
return conn.createChannel().then(function(_channel) {
channel = _channel;
return channel.assertQueue(process.env.AMQP_QUEUE || config.queue, {durable: false})
.then(function() {
channel.prefetch(1);
return channel.consume(process.env.AMQP_QUEUE || config.queue, reply);
})
.then(function() {
console.log(' [x] Awaiting RPC requests');
});
function connect() {
amqp.connect(process.env.AMQP_SRV || config.amqp).then(function(_conn) {
conn = _conn;
return conn.createChannel().then(function(_channel) {
channel = _channel;
return channel.assertQueue(process.env.AMQP_QUEUE || config.queue, {durable: false})
.then(function() {
channel.prefetch(1);
return channel.consume(process.env.AMQP_QUEUE || config.queue, reply);
})
.then(function() {
console.log(' [x] Awaiting RPC requests');
});
});
}).catch(function(e){
setTimeout(connect, 1000);
console.log(e);
});
}).then(null, console.warn);
}
connect();
{
"name": "service-geoip",
"version": "1.3.0",
"version": "1.3.1",
"description": "A RabbitMQ microservice wrapping the node-geoip package (geoip-lite on npm).",

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

var lib = require('../index'),
config = require('../config.json');
console.log = function() {}
describe('Module required', function() {

@@ -7,0 +5,0 @@ it('should not be undefined', function(){

var lib = require('../lib/geoip-service');
console.log = function() {}
describe('Module entry point', function() {

@@ -6,0 +4,0 @@ it('should not be undefined', function(){

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