同步操作将从 xzhangcqjtu/OnlinePythonTutor 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
---
2016年05月28日
The original Codeopticon server from 2015 used mongodb for logging, but
I've cut that out to simplify the code for now. Misc. code and notes
related to mongodb:
// on Linode, install mongo using:
// sudo apt-get install mongodb-clients
// sudo apt-get install mongodb-server
//
// and start using:
// sudo service mongodb start
//
// to access on the command line:
// mongo optlog
// db.events.count()
//
// See: https://github.com/mongodb/node-mongodb-native
var MongoClient = require('mongodb').MongoClient;
var mongodbConn = null; // this will be initialized when db connected
var mongodbCollection = null; // this will be initialized when db connected
var url = 'mongodb://localhost:27017/optlog';
// TODO: when should we disconnect the mongo client?!? is this causing a
// memory leak?
MongoClient.connect(url, function(err, db) {
assert.equal(null, err);
mongodbConn = db; // TODO: when should we CLOSE this connection?
if (PRODUCTION_RUN) {
mongodbCollection = db.collection('events'); // global!
} else {
mongodbCollection = db.collection('debug_temp_events'); // global!
}
});
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。