Organize directories

This commit is contained in:
Darren Clarke 2023-02-13 13:10:48 +00:00
parent 8a91c9b89b
commit 4898382f78
433 changed files with 0 additions and 0 deletions

View file

@ -1,23 +0,0 @@
import { Server } from "@hapi/hapi";
import cloneDeep from "lodash/cloneDeep";
import { deepFreeze } from "../helpers";
interface ConfigOptions {
config: unknown;
}
const register = async (
server: Server,
options: ConfigOptions
): Promise<void> => {
const safeConfig = deepFreeze(cloneDeep(options.config));
server.decorate("server", "config", () => safeConfig);
};
const ConfigPlugin = {
register,
name: "config",
version: "0.0.1",
};
export default ConfigPlugin;