UNPKG

smc-hub

Version:

CoCalc: Backend webserver component

19 lines (14 loc) 666 B
######################################################################### # 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 postgres = require('../postgres') misc = require('smc-util/misc') db_name = process.env['SMC_DB'] ? 'smc' db = postgres.db(database:db_name, debug:true, connect:false) db.connect cb: -> db.get_stats cb: (err, x) -> console.log JSON.stringify(x, null, 2) process.exit 0