UNPKG

smc-hub

Version:

CoCalc: Backend webserver component

37 lines (28 loc) 957 B
// Generated by CoffeeScript 2.5.1 (function() { //######################################################################## // This file is part of CoCalc: Copyright © 2020 Sagemath, Inc. // License: AGPLv3 s.t. "Commons Clause" – see LICENSE.md for details //######################################################################## // little helper for developing get_stats against the current dev database var db, db_name, misc, postgres, ref; postgres = require('../postgres'); misc = require('smc-util/misc'); db_name = (ref = process.env['SMC_DB']) != null ? ref : 'smc'; db = postgres.db({ database: db_name, debug: true, connect: false }); db.connect({ cb: function() { return db.get_stats({ cb: function(err, x) { console.log(JSON.stringify(x, null, 2)); return process.exit(0); } }); } }); }).call(this); //# sourceMappingURL=get_stats.js.map