Sentry is a useful tool to track errors that appear in your Wasp application.
Let's see how we can integrate it on the server and the client.
Make sure you have an account.
const fs = require('fs'); | |
const path = require('path'); | |
/** | |
* Main function to sync redirects from the appropriate docs version to static directory | |
*/ | |
function syncRedirects() { | |
try { | |
const isDevMode = checkDevelopmentMode(); | |
const staticRedirectsPath = getStaticRedirectsPath(); |
Sentry is a useful tool to track errors that appear in your Wasp application.
Let's see how we can integrate it on the server and the client.
Make sure you have an account.
Self-hosting is a great way to have control over your deployment infrastructure (you own the data) and a great way to keep the costs down (you pay a fixed amount per month). One of the well established ways to manage your self-hosted deployment is Caprover.
Deploying Wasp apps to Caprover is straightforward:
It'll take you ~1 hour depending on your level of experience with servers and Github Actions.
Self-hosting is a great way to have control over your deployment infrastructure (you own the data) and a great way to keep the costs down (you pay a fixed amount per month). One of the smoothest way to manage your self-hosted deployment is Coolify.
Deploying Wasp apps to Coolify is straightforward:
It'll take you ~1 hour depending on your level of experience with servers and Github Actions.
Let's deploy a Wasp app directly to a VPS. We'll do things directly on the machine without any management dashboard.
We'll need a couple of things to get this going:
Our setup will look like this:
app corsTest { | |
wasp: { | |
version: "^0.14.0" | |
}, | |
title: "cors-test", | |
server: { | |
middlewareConfigFn: import { getGlobalMiddleware } from "@src/data", | |
} | |
} |
app apiAuth { | |
wasp: { | |
version: "^0.14.0" | |
}, | |
title: "api-auth", | |
auth: { | |
userEntity: User, | |
onAuthFailedRedirectTo: "/login", | |
onAuthSucceededRedirectTo: "/", | |
methods: { |
# Put some dummy values here | |
GOOGLE_CLIENT_ID=x | |
GOOGLE_CLIENT_SECRET=x | |
# Put your Spotify client ID and secret here | |
SPOTIFY_CLIENT_ID= | |
SPOTIFY_CLIENT_SECRET= |
Note
We'll be loosly following the Vite instructions for ShadCN since Wasp is using Vite + React: https://ui.shadcn.com/docs/installation/vite We'll skip some of the steps since they don't apply or they are done differently with Wasp.
You won't be able to use the @
alias setup since it's not currently supported by Wasp. Because of this you'll need to adjust some imports when we generate components, but it should be fairly straightforward to do.
app fontsTest { | |
wasp: { | |
version: "^0.12.3" | |
}, | |
title: "fontsTest", | |
client: { | |
rootComponent: import { App } from "@src/App.jsx" | |
} | |
} |