Oasis 0.8.7 mobile (nodejs-project baseline)

This commit is contained in:
s1to 2026-07-09 09:56:30 +02:00
commit e563b86ede
226 changed files with 141968 additions and 0 deletions

26
src/server/ssb_config.js Normal file
View file

@ -0,0 +1,26 @@
const fs = require('fs');
const path = require('path');
const Config = require('ssb-config/inject');
const minimist = require('minimist');
const configPath = path.resolve(__dirname, '../configs', 'server-config.json');
const configData = JSON.parse(fs.readFileSync(configPath, 'utf8'));
const argv = process.argv.slice(2);
const i = argv.indexOf('--');
const conf = argv.slice(i + 1);
const cliArgs = ~i ? argv.slice(0, i) : argv;
let config = Config('ssb', minimist(conf));
config = { ...config, ...configData };
const debug = process.argv.includes('--debug') || process.env.OASIS_DEBUG === '1' || process.env.OASIS_DEBUG === 'true';
if (debug) {
config.logging = { ...(config.logging || {}), level: 'debug' };
}
const megabyte = Math.pow(2, 20);
config.blobs = config.blobs || {};
config.blobs.max = 50 * megabyte;
module.exports = config;