Skip to content

Commit

Permalink
add docs for other storage options
Browse files Browse the repository at this point in the history
  • Loading branch information
wernst committed Jun 26, 2024
1 parent 808c4fc commit 5ddd86a
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions packages/docs/src/pages/self-hosting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,20 @@ process.on('SIGINT', function () {
});
```

You may specify the storage adapter you want to use by setting the `storage` option. Triplit provides some default configurations of our storage adapters, which you can use by setting the `storage` option to the appropriate string value for the adapter. Typically this will use your `LOCAL_DATABASE_URL` environment variable so you'll want to make sure that's set. See the [source code](https://github.com/aspen-cloud/triplit/tree/main/packages/server) for the server for available options.

You can also pass in an instance of an adapter or a function that returns an instance of an adapter.

```typescript
function createAdapter() {
return new MyCustomAdapter();
}

const startServer = createServer({
storage: createAdapter,
});
```

You can now deploy the server to a cloud provider that supports Git deploys, like [Vercel](https://vercel.com/docs/git), [Netlify](https://docs.netlify.com/configure-builds/get-started/), or [Render](https://docs.render.com/deploys).

## Secrets
Expand Down

0 comments on commit 5ddd86a

Please sign in to comment.