function startMongoDB(root, mongoPort) {
    const mongod = os.platform() === 'win32' ? 'mongod.exe' : './mongod';
    const cwd = path.join(root, 'mongo');

    if (os.platform() !== 'win32') {
        // ubuntu desktop need libcurl4
        process.env.LD_LIBRARY_PATH = `LD_LIBRARY_PATH:${cwd}`
    }

    mongo = subprocess.spawn(mongod, ['--dbpath=db', `--port=${mongoPort}`], {
        cwd: cwd
    });
    mongo.stdout.on('data', data => {
        log(data.toString());
    });
    mongo.stderr.on('data', data => {
        log(data.toString());
    });
    mongo.on('SIGTERM', () => {
        mongo.exit(0);
        log('mongodb close');
    });
}
Start MongoDB Service
@param {String} root electron root path