Files
Liran Tal ee79ab30a9 feat: introduce support for native astro integration package (#354)
* feat: introduce support for native astro integration package

Signed-off-by: Liran Tal <liran.tal@gmail.com>

* fix: update license copyright to match other packages from trigger

Signed-off-by: Liran Tal <liran.tal@gmail.com>

* fix: doc update to refer to the official astro package from trigger

Signed-off-by: Liran Tal <liran.tal@gmail.com>

* fix: repo URLs update accordingly to official repo

Signed-off-by: Liran Tal <liran.tal@gmail.com>

* fix: remove myself as author of the package to not confuse people

Signed-off-by: Liran Tal <liran.tal@gmail.com>

* Remove package-lock because this is now in the pnpm monorepo

---------

Signed-off-by: Liran Tal <liran.tal@gmail.com>
Co-authored-by: Eric Allam <eallam@icloud.com>
2023-08-23 10:29:10 +01:00

1.1 KiB

Trigger.dev native integration add-on for Astro

This Astro integration project provides a createAstroRoute function that can be used to create an API endpoint route in your Astro project for integration with the hosted Trigger.dev platform.

Usage

  1. Install the package:
npm install --save @trigger.dev/astro

Note: yes, right now this package isn't published to the npm registry, so you'll need to install it from my GitHub repository if you want to experiment with it. Hopefully this soon graduates into an official npm package from the Trigger.dev team 🙏🏼

  1. Import the package in a src/pages/api/trigger.js file and define the route endpoint as follows:
import { createAstroRoute } from "triggerdev-astro-integration";
import { client } from "../../../trigger.js";

export const post = createAstroRoute(client);

More information

See the Trigger.dev Astro example project repository for a working example of this integration.

License

MIT

Author

(c) Liran Tal liran@lirantal.com