chore: dox++

This commit is contained in:
cha0s 2024-01-06 20:31:12 -06:00
parent 9d3ab086e5
commit bd2e024c61
5 changed files with 17 additions and 16 deletions

View File

@ -88,7 +88,7 @@ We added some configuration to `@flecks/server`. The `up` key configures the ord
are initialized when the server comes up. We make sure `@flecks/web` serves a webpage before
`@flecks/electron` tries to visit it.
:::tip
:::tip[...and Bob's your uncle]
`'...'` just means "everything else": if any other flecks implement that hook then they will run
here in an **undefined** order. It is valid to provide entries both before and after `'...'`, but

View File

@ -36,7 +36,7 @@ Let's make your website greet the user with a good ol' **hello world**.
To do this, you'll be creating your own little fleck. flecks also provides a built-in utility to
create a fleck.
:::note
:::note[Your application is a monorepo by default]
You may have noticed that your little starter application has a `packages` directory. By default,
flecks structures your application as a monorepo.
@ -145,7 +145,7 @@ This time, you will see:
hello server: ID hello-world
```
:::note
:::note[Still with us?]
...or whatever your application's ID is. We're assuming you're following along from
[the configuration page](./configuration).

View File

@ -127,7 +127,7 @@ export const hooks = {
}
```
:::tip
:::tip[Ess-Cue-Ell-ize-d]
`@flecks/db` uses [Sequelize](https://sequelize.org/) under the hood. You can dive into
[their documentation](https://sequelize.org/docs/v6/getting-started/) to learn even more.
@ -213,7 +213,7 @@ We're passing the path to our models directory to `require.context` which is the
`Flecks.provide`. This is completely equivalent to our original code, but now we can add more
models by adding individual files in `packages/content/src/models` and keep things tidy.
:::info
:::info[Gather some more knowledge]
For a more detailed treatment of gathering and providing in flecks, see
[the gathering guide](#todo).
@ -470,23 +470,23 @@ Awesome, we have a connection to a real postgres database!
```
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
<SOME_ID> postgres "docker-entrypoint.s…" 5 minutes ago Up 5 minutes 0.0.0.0:5432->5432/tcp, :::5432->5432/tcp flecks_sequelize
<SOME_ID> postgres "docker-entrypoint.s…" 5 minutes ago Up 5 minutes 0.0.0.0:5432->5432/tcp, :::5432->5432/tcp db_test_sequelize
```
You'll see under the `NAMES` column heading, there is an entry called `flecks_sequelize`. That's
You'll see under the `NAMES` column heading, there is an entry called `db_test_sequelize`. That's
our database! You can always
```
docker kill flecks_sequelize
docker kill db_test_sequelize
```
to free up any resources being used. flecks keeps the containers running so that you get a nice
fast application start.
:::note
:::note[What's in a name?]
The container name is based off of `@flecks/core.id` which by default is `flecks`. If you change
your application's ID, the container name will be different.
your application's ID, the container name will be different!
:::

View File

@ -26,7 +26,7 @@ override configuration such as this. This is done by like so:
`FLECKS_ENV__${Flecks.environmentalize(fleck)}__${key}`
```
:::tip
:::tip[Configure the application ID]
As an example, `@flecks/core`'s `id` key is set using the following variable:

View File

@ -54,7 +54,7 @@ socket.send(['Slap']);
Notice that **a dehydrated packet is an array**. The first element of the array is the
[gathered name](./gathering) of the packet.
:::tip
:::tip[Move the payload!]
The second element is the `data` passed to the packet constructor. We'll see a couple more
examples of sending dehydrated packets on this page to come.
@ -202,7 +202,7 @@ The packet being responded to.
The socket through which was sent the packet being responded to.
:::note
:::note[Full circle]
The result from your `respond` acceptor method is serialized and transmitted and is ultimately the
result of socket.send`:
@ -253,7 +253,7 @@ The type of intercom call to make (e.g. `@flecks/user.users`).
Arbitrary serializable data to send along with the intercom request.
:::tip[Fun fact]
:::tip[Putting the web in websockets]
Intercom can also be called from an implementation of `@flecks/web/server.request.socket` through
`req.intercom`.
@ -288,9 +288,10 @@ export const hooks = {
}
```
:::note
:::note[Is that really what I sound like?]
Intercom **will** invoke the `@flecks/socket.intercom` implementation of the requesting node.
Intercom **will** invoke the `@flecks/socket.intercom` implementation of the requesting node, not
only the others.
:::