Skip to content

Commit

Permalink
api: Await sentry plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
biwano committed Nov 22, 2023
1 parent b61a075 commit 33c151a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion carbonmark-api/api/serverless.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ console.warn(process.env.SENTRY_DSN);
console.warn(process.env.VERCEL_GIT_COMMIT_REF);
console.warn(packageJson.version);
// Registry sentry plugin
fastify.register(import("@immobiliarelabs/fastify-sentry"), {
await fastify.register(import("@immobiliarelabs/fastify-sentry"), {
dsn: process.env.SENTRY_DSN,
environment: process.env.VERCEL_GIT_COMMIT_REF,
release: packageJson.version,
Expand Down
5 changes: 5 additions & 0 deletions carbonmark-api/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ const PORT = 3003;
async function main() {
const fastify = Fastify();
try {
fastify.register(import("@immobiliarelabs/fastify-sentry"), {
dsn: process.env.SENTRY_DSN,
environment: process.env.VERCEL_GIT_COMMIT_REF,
release: "1.0.0",
});
await fastify.register(app);
await fastify.listen({ port: PORT });
console.info(`Server ready at http://localhost:${PORT}`);
Expand Down

0 comments on commit 33c151a

Please sign in to comment.