Move packages/apps back

This commit is contained in:
Darren Clarke 2023-03-10 08:26:51 +00:00
parent 6eaaf8e9be
commit 5535d6b575
348 changed files with 0 additions and 0 deletions

View file

@ -0,0 +1,28 @@
import * as Metamigo from "common";
import { defState } from "@digiresilience/montar";
import Manifest from "./manifest";
import config, { IAppConfig } from "../config";
export const deployment = async (
config: IAppConfig,
start = false
): Promise<Metamigo.Server> => {
// Build the manifest, which describes all the plugins needed for our application server
const manifest = await Manifest.build(config);
// Create the server and optionally start it
const server = Metamigo.deployment(manifest, config, start);
return server;
};
export const stopDeployment = async (server: Metamigo.Server): Promise<void> => {
return Metamigo.stopDeployment(server);
};
const server = defState("server", {
start: () => deployment(config, true),
stop: () => stopDeployment(server),
});
export default server;