Skip to content

Commit

Permalink
#564: updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
basmasking committed Dec 20, 2024
1 parent 6cf8fe6 commit 72b7111
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 4 deletions.
1 change: 1 addition & 0 deletions documentation/docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ export default defineConfig({
text: 'DEPLOY',
items: [
{ text: 'Segmentation', link: '/deploy/segmentation' },
{ text: 'Resources', link: '/deploy/resources' },
{ text: 'Environments', link: '/deploy/environments' },
{ text: 'Load balancing', link: '/deploy/load-balancing' },
{ text: 'Health checks', link: '/deploy/health-checks' },
Expand Down
4 changes: 2 additions & 2 deletions documentation/docs/deploy/environments.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
layout: doc

prev:
text: Segmentation
link: /deploy/segmentation
text: Resources
link: /deploy/resources

next:
text: Load balancing
Expand Down
34 changes: 34 additions & 0 deletions documentation/docs/deploy/resources.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
layout: doc

prev:
text: Segmentation
link: /deploy/segmentation

next:
text: Environments
link: /deploy/environments

---

# Resources

Unsegmented files are not shared between different segments. This is a powerful feature that allows you to create isolated segments that can be deployed independently. To enable different segments to share state, i.e. a database connection, Jitar uses a resource system.

## Resource files

Jitar will search for resource files in the project directory. The resource files are named `*.resource.json`. Each file defines the `module` that should be used as a resource. It's not possible to define a specific function or class from a module as a resource.

The file has the following structure.

```json
// app.resource.json
[
"./integrations/authentication/module",
"./integrations/database/module",
"./integrations/filestore/module",
"./integrations/notification/module"
]
```

It's possible to define multiple resource files within a project. This is useful in a monorepo setup where different modules might be managed by different teams.
4 changes: 2 additions & 2 deletions documentation/docs/deploy/segmentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ prev:
link: /develop/debugging

next:
text: Environments
link: /deploy/environments
text: Resources
link: /deploy/resources

---

Expand Down

0 comments on commit 72b7111

Please sign in to comment.