Socket
Socket
Sign inDemoInstall

nodestat2

Package Overview
Dependencies
3
Maintainers
2
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.6 to 2.0.0

config.sample.js

12

nodestat.js

@@ -32,7 +32,7 @@ /**

Promise.all([
this.collection.ensureIndex({domain: 1, minute: 1}, {unique: true, background: true}),
this.collection.ensureIndex({domain: 1, updated: 1}, {background: true}),
this.collection.ensureIndex({minute: 1}, {background: true, expireAfterSeconds: period}),
this.collection.ensureIndex({domain: 1}, {background: true}),
this.collection.ensureIndex({updated: 1}, {background: true})
this.collection.createIndex({domain: 1, minute: 1}, {unique: true, background: true}),
this.collection.createIndex({domain: 1, updated: 1}, {background: true}),
this.collection.createIndex({minute: 1}, {background: true, expireAfterSeconds: period}),
this.collection.createIndex({domain: 1}, {background: true}),
this.collection.createIndex({updated: 1}, {background: true})
]).then(res => {

@@ -168,3 +168,3 @@ this.start(interval);

this.collection.update(where, upsertData, {upsert: true}, function() {
this.collection.updateOne(where, upsertData, {upsert: true}, function() {
// console.log(arguments);

@@ -171,0 +171,0 @@ });

{
"name": "nodestat2",
"version": "1.0.6",
"version": "2.0.0",
"description": "nodestat",

@@ -22,4 +22,4 @@ "main": "nodestat.js",

"express": "^4.15.3",
"mongodb": "^2.2.28"
"mongodb": "~3.5.7"
}
}

@@ -8,15 +8,16 @@ let config = require('./config');

app.get('/', (req, res) => {
res.send('Hello, Nodestat');
res.send('Hello, Nodestat');
});
MongoClient.connect('mongodb://localhost:27017/viboom', (err, db) => {
MongoClient.connect(`mongodb://localhost:27017`, {useUnifiedTopology: true})
.then(conn => {
config.app = app;
config.mongoClient = conn.db(config.database);
config.app = app;
config.mongoClient = db;
nodestat.init(config);
})
.catch(err => {
console.log(err);
});
app.listen(3000);
console.log('http://localhost:3000');
app.listen(3000, () => console.log('http://localhost:3000'));
SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc