mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
18 lines
563 B
JavaScript
18 lines
563 B
JavaScript
import { setGalaxyInstance } from "app";
|
|
|
|
/**
|
|
* Most of the time, all we do is launch a GalaxyApp with the passed configs
|
|
*
|
|
* @param {string} label
|
|
* @returns {function} Returns a function that accepts the application
|
|
* configuration and returns a galaxy instance.
|
|
*/
|
|
export const defaultAppFactory = (config, label = "Galaxy") => {
|
|
return setGalaxyInstance((GalaxyApp) => {
|
|
const { options, bootstrapped } = config;
|
|
const app = new GalaxyApp(options, bootstrapped);
|
|
console.debug(`${label} app`);
|
|
return app;
|
|
});
|
|
};
|