From 54668da0ab64fa723cb7d42ada8c2cbbac1f8288 Mon Sep 17 00:00:00 2001 From: cha0s Date: Wed, 22 Nov 2023 03:49:36 -0600 Subject: [PATCH] chore: bump --- TODO.md | 7 + build-configs.md | 14 +- config.md | 184 +++++--- hooks.md | 1148 ++++++++++++++++++++++++++++++++++++++++++---- 4 files changed, 1181 insertions(+), 172 deletions(-) diff --git a/TODO.md b/TODO.md index 87a10f36..bc3bdb07 100644 --- a/TODO.md +++ b/TODO.md @@ -1,3 +1,10 @@ # TODO This page documents all the TODO items in this project. + +- @flecks/dox/src/parser.js:309:6 + > @todo Aliased fleck paths are gonna be bad. +- @flecks/governor/src/limiter.js:10:2 + > @todo node-redis@4 +- @flecks/web/src/server/build/web.webpack.config.js:50:4 + > @todo source maps working? diff --git a/build-configs.md b/build-configs.md index 4d591cd1..a6cded1d 100644 --- a/build-configs.md +++ b/build-configs.md @@ -4,28 +4,28 @@ This page documents all the build configuration files in this project. ## `babel.config.js` -*No description provided.* +Babel configuration. See: https://babeljs.io/docs/en/config-files ## `default.eslint.config.js` -*No description provided.* +ESLint defaults. The default `eslint.config.js` just reads from this file so that the build process can dynamically configure parts of ESLint. ## `eslint.config.js` -*No description provided.* +ESLint configuration. See: https://eslint.org/docs/user-guide/configuring/ ## `fleckspack.config.js` -*No description provided.* +Flecks webpack configuration. See: https://webpack.js.org/configuration/ ## `postcss.config.js` -*No description provided.* +PostCSS config file. See: https://github.com/postcss/postcss#usage ## `template.ejs` -*No description provided.* +Template file used to generate the client HTML. See: https://github.com/jantimon/html-webpack-plugin/blob/main/docs/template-option.md ## `webpack.config.js` -*No description provided.* +Webpack configuration. See: https://webpack.js.org/configuration/ diff --git a/config.md b/config.md index cb1e647d..2cbe24b4 100644 --- a/config.md +++ b/config.md @@ -4,21 +4,21 @@ This page documents all the configuration in this project. ## `@flecks/core` -> *No description provided.* +> The ID of your application. ```javascript -id: "flecks" +id: 'flecks' ``` ## `@flecks/core/server` -> *No description provided.* +> Build targets to exclude from ESLint. ```javascript eslint.exclude: [] ``` -> *No description provided.* +> Build targets to profile with `webpack.debug.ProfilingPlugin`. ```javascript profile: [] @@ -26,53 +26,53 @@ profile: [] ## `@flecks/db/server` -> *No description provided.* +> The database to connect to. ```javascript -database: ":memory:" +database: ':memory:' ``` -> *No description provided.* +> SQL dialect. See: https://sequelize.org/v5/manual/dialects.html ```javascript -dialect: "sqlite" +dialect: 'sqlite' ``` -> *No description provided.* +> Database server host. ```javascript -host: void 0 +host: undefined ``` -> *No description provided.* +> Database server password. ```javascript -password: void 0 +password: undefined ``` -> *No description provided.* +> Database server port. ```javascript -port: void 0 +port: undefined ``` -> *No description provided.* +> Database server username. ```javascript -username: void 0 +username: undefined ``` ## `@flecks/docker/server` -> *No description provided.* +> Whether to run docker containers. ```javascript -enabled: !0 +enabled: true ``` ## `@flecks/dox/server` -> *No description provided.* +> Rewrite the output filenames of source files. `filename.replace(new RegExp([key]), [value]);` ```javascript filenameRewriters: {} @@ -80,75 +80,97 @@ filenameRewriters: {} ## `@flecks/electron/server` -> *No description provided.* +> Browser window options. See: https://www.electronjs.org/docs/latest/api/browser-window ```javascript browserWindowOptions: {} ``` -> *No description provided.* +> Install devtools extensions (by default). If `true`, will install some devtools extensions based on which flecks are enabled. You can pass an array of Chrome store IDs to install a list of custom extensions. Extensions will not be installed if `'production' === process.env.NODE_ENV` ```javascript -installExtensions: !0 +installExtensions: true ``` -> *No description provided.* +> Quit the app when all windows are closed. ```javascript -quitOnClosed: !0 +quitOnClosed: true ``` -> *No description provided.* +> The URL to load in electron by default. Defaults to `http://${flecks.get('@flecks/web/server.public')}`. ```javascript -url: void 0 +url: undefined ``` ## `@flecks/fleck/server` -> *No description provided.* +> Webpack stats configuration when building fleck target. ```javascript -stats: {assetsSort:"name",assetsSpace:1/0,children:!1,colors:!0,excludeAssets:[/^(?:build|src|test)\//],groupAssetsByChunk:!1,groupAssetsByEmitStatus:!1,groupAssetsByExtension:!1,groupAssetsByInfo:!1,groupAssetsByPath:!1,modules:!1} +stats: { + assetsSort: 'name', + assetsSpace: Infinity, + children: false, + colors: true, + excludeAssets: [/^(?:build|src|test)\//], + groupAssetsByChunk: false, + groupAssetsByEmitStatus: false, + groupAssetsByExtension: false, + groupAssetsByInfo: false, + groupAssetsByPath: false, + modules: false, + } ``` ## `@flecks/governor/server` -> *No description provided.* +> All keys used to determine fingerprint. ```javascript -keys: ["ip"] +keys: ['ip'] ``` > *No description provided.* ```javascript -web: {keys:["ip"],points:60,duration:30,ttl:30} +web: { + keys: ['ip'], + points: 60, + duration: 30, + ttl: 30, + } ``` > *No description provided.* ```javascript -socket: {keys:["ip"],points:60,duration:30,ttl:30} +socket: { + keys: ['ip'], + points: 60, + duration: 30, + ttl: 30, + } ``` ## `@flecks/react` -> *No description provided.* +> Whether to enable server-side rendering. ```javascript -ssr: !0 +ssr: true ``` ## `@flecks/redis/server` -> *No description provided.* +> Redis server host. ```javascript -host: "localhost" +host: 'localhost' ``` -> *No description provided.* +> Redis server port. ```javascript port: 6379 @@ -156,128 +178,142 @@ port: 6379 ## `@flecks/server` -> *No description provided.* +> Whether HMR is enabled. ```javascript -hot: !1 +hot: false ``` -> *No description provided.* +> Arguments to pass along to node. See: https://nodejs.org/api/cli.html ```javascript nodeArgs: [] ``` -> *No description provided.* +> Whether to start the server after building. ```javascript -start: !0 +start: true ``` -> *No description provided.* +> Webpack stats configuration when building server target. ```javascript -stats: {chunks:!1,colors:!0,modules:!1} +stats: { + chunks: false, + colors: true, + modules: false, + } ``` ## `@flecks/user/local/server` -> *No description provided.* +> Path to redirect to after failed login. ```javascript -failureRedirect: "/" +failureRedirect: '/' ``` -> *No description provided.* +> Path to redirect to after successful login. ```javascript -successRedirect: "/" +successRedirect: '/' ``` ## `@flecks/user/session/server` -> *No description provided.* +> Set the cookie secret for session encryption. See: http://expressjs.com/en/resources/middleware/cookie-parser.html ```javascript -cookieSecret: "Set the FLECKS_ENV_FLECKS_USER_SESSION_SERVER_cookieSecret environment variable!" +cookieSecret: 'Set the FLECKS_ENV_FLECKS_USER_SESSION_SERVER_cookieSecret environment variable!' ``` ## `@flecks/web/server` -> *No description provided.* +> (webpack-dev-server) Disable the host check. See: https://github.com/webpack/webpack-dev-server/issues/887 ```javascript -devDisableHostCheck: !1 +devDisableHostCheck: false ``` -> *No description provided.* +> (webpack-dev-server) Host to bind. ```javascript -devHost: "localhost" +devHost: 'localhost' ``` -> *No description provided.* +> (webpack-dev-server) Port to bind. ```javascript -devPort: void 0 +devPort: undefined ``` -> *No description provided.* +> (webpack-dev-server) Public path to serve. Defaults to `flecks.get('@flecks/web/server.public')`. ```javascript -devPublic: void 0 +devPublic: undefined ``` -> *No description provided.* +> (webpack-dev-server) Webpack stats output. ```javascript -devStats: {assets:!1,chunks:!1,colors:!0,modules:!1} +devStats: { + assets: false, + chunks: false, + colors: true, + modules: false, + } ``` -> *No description provided.* +> Modules to externalize using `webpack.DllPlugin`. ```javascript dll: [] ``` -> *No description provided.* +> Force building http target even if there's a fleck target. ```javascript -forceBuildWithFleck: !1 +forceBuildWithFleck: false ``` -> *No description provided.* +> Host to bind. ```javascript -host: "0.0.0.0" +host: '0.0.0.0' ``` -> *No description provided.* +> Build path. ```javascript -output: "web" +output: 'web' ``` -> *No description provided.* +> Port to bind. ```javascript port: 32340 ``` -> *No description provided.* +> Public path to server. ```javascript -public: "localhost:32340" +public: 'localhost:32340' ``` -> *No description provided.* +> Webpack stats configuration when building HTTP target. ```javascript -stats: {children:!1,chunks:!1,colors:!0,modules:!1} +stats: { + children: false, + chunks: false, + colors: true, + modules: false, + } ``` -> *No description provided.* +> Proxies to trust. See: https://www.npmjs.com/package/proxy-addr ```javascript -trust: !1 +trust: false ``` diff --git a/hooks.md b/hooks.md index 39cde3a3..fdf07820 100644 --- a/hooks.md +++ b/hooks.md @@ -4,347 +4,1313 @@ This page documents all the hooks in this project. ## `@flecks/core.build` +> +> Hook into webpack configuration. + +
+Parameters + +
+
Implementations +
+ +
+Invocations +
+### Example usage + +```javascript +export const hooks = { + '@flecks/core.build': (target, config, env, argv) => { + if ('something' === target) { + if ('production' === argv.mode) { + config.plugins.push(new SomePlugin()); + } + } + } +}; +``` + ## `@flecks/core.build.alter` +> +> Alter build configurations after they have been hooked. + +
+Parameters + +
+
Implementations
+
+Invocations + +
+ +### Example usage + +```javascript +export const hooks = { + '@flecks/core.build.alter': (configs) => { + // Maybe we want to do something if a target exists..? + if (configs.someTarget) { + // Do something... + // And then maybe we want to remove it from the build configuration..? That's ok! + delete configs.someTarget; + } + } +}; +``` + ## `@flecks/core.build.config` +> +> Register build configuration. +> +
Implementations
+### Example usage + +```javascript +export const hooks = { + '@flecks/core.build.config': () => [ + /** + * If you document your config files like this, documentation will be automatically + * generated. + */ + '.myrc.js', + /** + * Make sure you return them as an array expression, like this. + */ + ['mygeneralrc.js', {specifier: (specific) => `${specific}.mygeneralrc.js`}], + ] +}; +``` + ## `@flecks/core.commands` +> +> Define CLI commands. +> +
Implementations
+
+Invocations + +
+ +### Example usage + +```javascript +export const hooks = { + '@flecks/core.commands': (program) => ({ + // So this could be invoked like: + // npx flecks something -t --blow-up blah + something: { + action: (...args) => { + // Run the command... + }, + args: [ + '', + ], + description: 'This command does tests and also blows up', + options: [ + '-t, --test', 'Do a test', + '-b, --blow-up', 'Blow up instead of running the command', + ], + }, + }) +}; +``` + ## `@flecks/core.config` +> +> Define configuration. +> +
Implementations
+### Example usage + +```javascript +export const hooks = { + '@flecks/core.config': () => ({ + whatever: 'configuration', + your: 1337, + fleck: 'needs', + /** + * Also, comments like this will be used to automatically generate documentation. + */ + though: 'you should keep the values serializable', + }) +}; +``` + +## `@flecks/core.hmr` + +> +> Invoked when a fleck is HMR'd + +
+Parameters +
    +
  • {string} path +
    The path of the fleck
  • +
  • {Module} updatedFleck +
    The updated fleck module. +
  • +
+
+ +### Example usage + +```javascript +export const hooks = { + '@flecks/core.hmr': (path, updatedFleck) => { + if ('my-fleck' === path) { + updatedFleck.doSomething(); + } + } +}; +``` + +## `@flecks/core.hmr.gathered` + +> +> Invoked when a gathered class is HMR'd. + +
+Parameters +
    +
  • {constructor} Class +
    The class.
  • +
  • {string} hook +
    The gather hook; e.g. `@flecks/db/server.models`. +
  • +
+
+ +### Example usage + +```javascript +export const hooks = { + '@flecks/core.hmr.gathered': (Class, hook) => { + // Do something with Class... + } +}; +``` + ## `@flecks/core.starting` +> +> Invoked when the application is starting. Use for order-independent initialization tasks. +> +
Implementations +
+ +
+Invocations +
+### Example usage + +```javascript +export const hooks = { + '@flecks/core.starting': (flecks) => { + flecks.set('$my-fleck/value', initializeMyValue()); + } +}; +``` + ## `@flecks/core.targets` +> +> Define build targets. +> +
Implementations
+
+Invocations + +
+ +### Example usage + +```javascript +export const hooks = { + '@flecks/core.targets': () => ['sometarget'] +}; +``` + ## `@flecks/db/server.models` +> +> Gather database models. +> +> In the example below, your fleck would have a `models` subdirectory, and each model would be +> defined in its own file. +> See: https://github.com/cha0s/flecks/tree/master/packages/user/src/server/models +> +
Implementations +
+ +
+Invocations +
+### Example usage + +```javascript +export const hooks = { + '@flecks/db/server.models': Flecks.provide(require.context('./models', false, /\.js$/)) +}; +``` + ## `@flecks/db/server.models.decorate` +> +> Decorate database models. +> +> In the example below, your fleck would have a `models/decorators` subdirectory, and each +> decorator would be defined in its own file. +> See: https://github.com/cha0s/flecks/tree/master/packages/user/src/local/server/models/decorators +> + +
+Parameters +
    +
  • {constructor} Model +
    The model to decorate. +
  • +
+
+
Implementations +
+ +
+Invocations +
+### Example usage + +```javascript +export const hooks = { + '@flecks/db/server.models.decorate': Flecks.decorate(require.context('./models/decorators', false, /\.js$/)) +}; +``` + ## `@flecks/docker.containers` +> +> Define docker containers. +> +> Beware: the user running the server must have Docker privileges. +> See: https://docs.docker.com/engine/install/linux-postinstall/#manage-docker-as-a-non-root-user +> +
Implementations
+
+Invocations + +
+ +### Example usage + +```javascript +export const hooks = { + '@flecks/docker.containers': () => ({ + someContainer: { + // Environment variables. + environment: { + SOME_CONTAINER_VAR: 'hello', + }, + // The docker image. + image: 'some-image:latest', + // Some container path you'd like to persist. Flecks handles the host path. + mount: '/some/container/path', + // Expose ports. + ports: {3000: 3000}, + }, + }) +}; +``` + ## `@flecks/electron/server.initialize` +> +> Invoked when electron is initializing. + +
+Parameters +
    +
  • {Electron} electron +
    The electron module. +
  • +
+
+
Implementations
+
+Invocations + +
+ +### Example usage + +```javascript +export const hooks = { + '@flecks/electron/server.initialize': (electron) => { + electron.app.on('will-quit', () => { + // ... + }); + } +}; +``` + ## `@flecks/electron/server.window` +> +> Invoked when a window is created + +
+Parameters +
    +
  • {Electron.BrowserWindow} win +
    The electron browser window. See: https://www.electronjs.org/docs/latest/api/browser-window +
  • +
+
+
Implementations +
+ +
+Invocations +
+### Example usage + +```javascript +export const hooks = { + '@flecks/electron/server.window': (win) => { + win.maximize(); + } +}; +``` + ## `@flecks/react.providers` +> +> Define React Providers. +> +> Note: `req` will be only be defined when server-side rendering. + +
+Parameters +
    +
  • {http.ClientRequest} req +
    The HTTP request object. +
  • +
+
+
Implementations +
+ +
+Invocations + +
+ +### Example usage + +```javascript +export const hooks = { + '@flecks/react.providers': (req) => { + // Generally it makes more sense to separate client and server concerns using platform + // naming conventions, but this is just a small contrived example. + return req ? serverSideProvider(req) : clientSideProvider(); + } +}; +``` + +## `@flecks/react.roots` + +> +> Define root-level React components that are mounted as siblings on `#main`. +> Note: `req` will be only be defined when server-side rendering. +> +> Return either a React component or an array whose elements must either be a React component +> or an array of two elements where the first element is the component and the second element +> is the props passed to the component. + +
+Parameters +
    +
  • {http.ClientRequest} req +
    The HTTP request object. +
  • +
+
+ +
+Invocations + +
+ +### Example usage + +```javascript +export const hooks = { + '@flecks/react.roots': (req) => { + // Note that we're not returning ``, but `Component`. + return [ + Component, + [SomeOtherComponent, {prop: 'value'}] + ]; + // You can also just: + return Component; + } +}; +``` + +## `@flecks/redux.effects` + +> +> Define side-effects to run against Redux actions. +> + +
+Invocations + +
+ +### Example usage + +```javascript +export const hooks = { + '@flecks/redux.effects': () => ({ + someActionName: (store, action) => { + // Runs when `someActionName` actions are dispatched. + }, + }) +}; +``` + +## `@flecks/redux.reducers` + +> +> Define root-level reducers for the Redux store. +> + +
+Invocations +
+### Example usage + +```javascript +export const hooks = { + '@flecks/redux.reducers': () => { + return (state, action) => { + // Whatever you'd like. + return state; + }; + } +}; +``` + ## `@flecks/redux.slices` +> +> Define Redux slices. +> +> See: https://redux-toolkit.js.org/api/createSlice +> +
Implementations
+
+Invocations + +
+ +### Example usage + +```javascript +export const hooks = { + '@flecks/redux.slices': () => { + const something = createSlice( + // ... + ); + return { + something: something.reducer, + }; + } +}; +``` + ## `@flecks/redux.store` +> +> Modify Redux store configuration. + +
+Parameters +
    +
  • {Object} options +
    A mutable object with keys for enhancers and middleware. +
  • +
+
+
Implementations
+
+Invocations + +
+ +### Example usage + +```javascript +export const hooks = { + '@flecks/redux.store': (options) => { + options.enhancers.splice(someIndex, 1); + options.middleware.push(mySpecialMiddleware); + } +}; +``` + ## `@flecks/repl.commands` +> +> Define REPL commands. +> +> Note: commands will be prefixed with a period in the Node REPL. +> +
Implementations
+
+Invocations + +
+ +### Example usage + +```javascript +export const hooks = { + '@flecks/repl.commands': () => ({ + someCommand: (...args) => { + // args are passed from the Node REPL. So, you could invoke it like: + // .someCommand foo bar + // and `args` would be `['foo', 'bar']`. + }, + }) +}; +``` + ## `@flecks/repl.context` +> +> Provide global context to the REPL. +> +
Implementations
+
+Invocations + +
+ +### Example usage + +```javascript +export const hooks = { + '@flecks/repl.context': () => { + // Now you'd be able to do like: + // `node> someValue;` + // and the REPL would evaluate it to `'foobar'`. + return { + someValue: 'foobar', + }; + } +}; +``` + ## `@flecks/server.up` +> +> Define sequential actions to run when the server comes up. +> +
Implementations
+### Example usage + +```javascript +export const hooks = { + '@flecks/server.up': async () => { + await youCanDoAsyncThingsHere(); + } +}; +``` + ## `@flecks/socket.client` +> +> Modify Socket.io client configuration. +> +> See: https://socket.io/docs/v4/client-options/ +> +
Implementations
+### Example usage + +```javascript +export const hooks = { + '@flecks/socket.client': () => ({ + timeout: Infinity, + }) +}; +``` + ## `@flecks/socket.intercom` +> +> Define server-side intercom channels. +> +
Implementations
+
+Invocations + +
+ +### Example usage + +```javascript +export const hooks = { + '@flecks/socket.intercom': (req) => ({ + // This would have been called like: + // `const result = await req.intercom('someChannel', payload)`. + // `result` will be an `n`-length array, where `n` is the number of server instances. Each + // element in the array will be the result of `someServiceSpecificInformation()` running + // against that server instance. + someChannel: async (payload, server) => { + return someServiceSpecificInformation(); + }, + }) +}; +``` + ## `@flecks/socket.packets` +> +> Define socket packets. +> +> In the example below, your fleck would have a `packets` subdirectory, and each +> decorator would be defined in its own file. +> See: https://github.com/cha0s/flecks/tree/master/packages/redux/src/packets +> +> See: https://github.com/cha0s/flecks/tree/master/packages/socket/src/packet/packet.js +> See: https://github.com/cha0s/flecks/tree/master/packages/socket/src/packet/redirect.js +> +
Implementations
+
+Invocations + +
+ +### Example usage + +```javascript +export const hooks = { + '@flecks/socket.packets': Flecks.provide(require.context('./packets', false, /\.js$/)) +}; +``` + ## `@flecks/socket.packets.decorate` +> +> Decorate database models. +> +> In the example below, your fleck would have a `packets/decorators` subdirectory, and each +> decorator would be defined in its own file. + +
+Parameters +
    +
  • {constructor} Packet +
    The packet to decorate. +
  • +
+
+
Implementations +
+ +
+Invocations +
+### Example usage + +```javascript +export const hooks = { + '@flecks/socket.packets.decorate': Flecks.decorate(require.context('./packets/decorators', false, /\.js$/)) +}; +``` + ## `@flecks/socket.server` +> +> Modify Socket.io server configuration. +> +> See: https://socket.io/docs/v4/server-options/ +> +
Implementations
+### Example usage + +```javascript +export const hooks = { + '@flecks/socket.server': () => ({ + pingTimeout: Infinity, + }) +}; +``` + ## `@flecks/socket/server.request.socket` +> +> Define middleware to run when a socket connection is established. +> +
Implementations
+### Example usage + +```javascript +export const hooks = { + '@flecks/socket/server.request.socket': () => (socket, next) => { + // Express-style route middleware... + next(); + } +}; +``` + ## `@flecks/user.session` +> +> Modify express-session configuration. +> +> See: https://www.npmjs.com/package/express-session +> +
Implementations +
+ +
+Invocations +
+### Example usage + +```javascript +export const hooks = { + '@flecks/user.session': () => ({ + saveUninitialized: true, + }) +}; +``` + ## `@flecks/web.config` +> +> Override flecks configuration sent to client flecks. + +
+Parameters +
    +
  • {http.ClientRequest} req +
    The HTTP request object. +
  • +
+
+
Implementations
+
+Invocations + +
+ +### Example usage + +```javascript +export const hooks = { + '@flecks/web.config': (req) => ({ + someClientFleck: { + someConfig: req.someConfig, + }, + }) +}; +``` + ## `@flecks/web.routes` +> +> Define HTTP routes. +> +
Implementations
+
+Invocations + +
+ +### Example usage + +```javascript +export const hooks = { + '@flecks/web.routes': () => [ + { + method: 'get', + path: '/some-path', + middleware: (req, res, next) => { + // Express-style route middleware... + next(); + }, + }, + ] +}; +``` + ## `@flecks/web/client.up` +> +> Define sequential actions to run when the client comes up. +> +
Implementations +
+ +
+Invocations +
+### Example usage + +```javascript +export const hooks = { + '@flecks/web/client.up': async () => { + await youCanDoAsyncThingsHere(); + } +}; +``` + ## `@flecks/web/server.request.route` +> +> Define middleware to run when a route is matched. +> +
Implementations
+### Example usage + +```javascript +export const hooks = { + '@flecks/web/server.request.route': () => (req, res, next) => { + // Express-style route middleware... + next(); + } +}; +``` + ## `@flecks/web/server.request.socket` +> +> Define middleware to run when an HTTP socket connection is established. +> +
Implementations
+### Example usage + +```javascript +export const hooks = { + '@flecks/web/server.request.socket': () => (req, res, next) => { + // Express-style route middleware... + next(); + } +}; +``` + ## `@flecks/web/server.stream.html` +> +> Define composition functions to run over the HTML stream prepared for the client. + +
+Parameters +
    +
  • {stream.Readable} stream +
    The HTML stream.
  • +
  • {http.ClientRequest} req +
    The HTTP request object. +
  • +
+
+
Implementations +
+ +
+Invocations +
+### Example usage + +```javascript +export const hooks = { + '@flecks/web/server.stream.html': (stream, req) => { + return stream.pipe(myTransformStream); + } +}; +``` + ## `@flecks/web/server.up` +> +> Define sequential actions to run when the HTTP server comes up. +> +
Implementations
+ +
+Invocations + +
+ +### Example usage + +```javascript +export const hooks = { + '@flecks/web/server.up': async () => { + await youCanDoAsyncThingsHere(); + } +}; +```