Commit bfb1c5f1 authored by wang's avatar wang

nk 修复

parent ac286c37
...@@ -6,7 +6,8 @@ import {MongoClient} from "mongodb"; ...@@ -6,7 +6,8 @@ import {MongoClient} from "mongodb";
const uri = "mongodb://lcc-spider:JIUsfhiad&^@54.183.159.9:27017/?authSource=admin&directConnection=true"; const uri = "mongodb://lcc-spider:JIUsfhiad&^@54.183.159.9:27017/?authSource=admin&directConnection=true";
const client = new MongoClient(uri); const client = new MongoClient(uri);
log4js.levels.INFO.colour = 'white';
// console.log(log4js.levels.INFO.colour);
log4js.configure({ log4js.configure({
appenders: { appenders: {
out: { out: {
...@@ -95,6 +96,7 @@ class PxBypass { ...@@ -95,6 +96,7 @@ class PxBypass {
} }
async initMongo() { async initMongo() {
this.log.info("init mongo 获取环境数据")
const database = client.db("env"); const database = client.db("env");
const movies = database.collection("env_shape"); const movies = database.collection("env_shape");
// Query for a movie that has the title 'The Room' // Query for a movie that has the title 'The Room'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment