Skip to content

Commit

Permalink
notes
Browse files Browse the repository at this point in the history
  • Loading branch information
joshmossas committed Aug 7, 2024
1 parent b798f47 commit ab2d9e9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/implementing-an-arri-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ arri codegen https://myapi.com/__definition # http endpoint

## Bonus: Create a plugin for the Arri CLI

Server plugins dictate what happens when you run `arri dev` and `arri build`.
Server plugins dictate what happens when you run `arri dev` and `arri build`. By creating a plugin you can create a fully automated experience.

In order to create a server plugin use the `defineServerConfig` helper from the `arri` package:

Expand Down Expand Up @@ -267,7 +267,7 @@ Let's say we've configured a go generator that reads our go application and outp
const goServer = defineServerConfig({
devArgs: {},
devFn(_, generators) {
// run go generate
// run "go generate"
execSync("go generate", {
stdio: "inherit",
});
Expand All @@ -277,7 +277,7 @@ const goServer = defineServerConfig({
) as AppDefinition;
// run all of the registered Arri generators
await Promise.all(generators.map((item) => item.generator(appDef)));
// start run application
// start the go application
execSync("go run main.go", {
stdio: 'inherit'
});
Expand Down

0 comments on commit ab2d9e9

Please sign in to comment.