mb23
mb23
WWasp-lang
Created by mb23 on 9/12/2024 in #đŸ™‹questions
User is logged out quite quickly
@miho ah, thanks, the 401 might be the problem! Is there any way to change this behaviour on my end?
9 replies
WWasp-lang
Created by mb23 on 9/12/2024 in #đŸ™‹questions
User is logged out quite quickly
@miho sorry, after 3 minutes or so đŸ™‚
9 replies
WWasp-lang
Created by mb23 on 8/28/2024 in #đŸ™‹questions
Deploying Migration fails
Thanks for your response @miho !
12 replies
WWasp-lang
Created by mb23 on 8/28/2024 in #đŸ™‹questions
Deploying Migration fails
I have fixed this issue by removing the entry for the failed migration in the database in Railway and re-deploying the whole thing
12 replies
WWasp-lang
Created by mb23 on 8/28/2024 in #đŸ™‹questions
Deploying Migration fails
@kapa.ai How can I access the Prisma database? Wasp only offers a limited set of options for wasp db, no?
12 replies
WWasp-lang
Created by mb23 on 7/15/2024 in #đŸ™‹questions
How can I offer a free trial?
@martinsos @neogeofun @miho It was really quite easy. Here's the adjusted createStripeCheckoutSession code: export async function createStripeCheckoutSession({ priceId, customerId, mode, }: { priceId: string; customerId: string; mode: 'subscription' | 'payment'; }) { return await stripe.checkout.sessions.create({ line_items: [ { price: priceId, quantity: 1, }, ], mode: mode, success_url: ${DOMAIN}/checkout?success=true, cancel_url: ${DOMAIN}/checkout?canceled=true, automatic_tax: { enabled: true }, customer_update: { address: 'auto', }, customer: customerId, ...(mode === 'subscription' && { subscription_data: { trial_settings: { end_behavior: { missing_payment_method: 'cancel', }, }, trial_period_days: 7, }, }), }); }
12 replies
WWasp-lang
Created by mb23 on 8/8/2024 in #đŸ™‹questions
Best way to use jobs/workers
@matija ok great, thanks đŸ™‚
19 replies
WWasp-lang
Created by mb23 on 8/8/2024 in #đŸ™‹questions
Best way to use jobs/workers
@matija Thanks for your feedback! I've created an AI blog post generation tool: contentforce.ai I'm using jobs for all content creation related tasks at the moment, for example: - creating an outline (multiple OpenAI API requests + ValueSERP API request) --> task duration: ~ 5 minutes - doing research for blog articles (multiple OpenAI API requests + + ValueSERP API request + DataForSEO API request + Google Cloud NLP API request) --> task duration: ~ 5 minutes When testing it without jobs, I had the feeling that these task are not properly executed when I something "unexpected" happens such as closing the tab/browser or going to another page.
19 replies
WWasp-lang
Created by mb23 on 8/8/2024 in #đŸ™‹questions
Best way to use jobs/workers
@miho nice, thanks a lot, you've helped me a lot!
19 replies
WWasp-lang
Created by mb23 on 8/8/2024 in #đŸ™‹questions
Best way to use jobs/workers
@miho ok great! at the moment, I'm also using the id and the state of the current job to be able to cancel the job: const boss = new PgBoss({ connectionString: process.env.DATABASE_URL_PGBOSS }); await boss.start(); ... let bosscancel = await boss.cancel(jobId); Can you tell me how I can access the PgBoss instance that's automatically started? đŸ™‚
19 replies
WWasp-lang
Created by mb23 on 8/8/2024 in #đŸ™‹questions
Best way to use jobs/workers
@miho I've just started like this and didn't question it haha. Good to know! So, this will probably also solve my problem of having too many connections, right? đŸ™‚
19 replies
WWasp-lang
Created by mb23 on 8/8/2024 in #đŸ™‹questions
Best way to use jobs/workers
@miho oh, good to know đŸ˜„ Here's an extract of how I do it in the worker: import PgBoss from 'pg-boss'; .... export const createOutlineWorker: CreateOutlineJob<Input, Output> = async ({ keywordId, keywordType }, context) => { const boss = new PgBoss({ connectionString: process.env.DATABASE_URL_PGBOSS }); await boss.start(); try {
19 replies
WWasp-lang
Created by mb23 on 7/11/2024 in #đŸ™‹questions
Updating and redeploying Postgres DB in Railway
@sodic Yes, you're completely right haha! it worked đŸ™‚ Thanks for your help đŸ™‚
16 replies
WWasp-lang
Created by mb23 on 7/11/2024 in #đŸ™‹questions
Updating and redeploying Postgres DB in Railway
No description
16 replies
WWasp-lang
Created by mb23 on 7/11/2024 in #đŸ™‹questions
Updating and redeploying Postgres DB in Railway
@sodic good question. The server crashed 10 mins ago. I'm just trying to redeploy it but it's not working. Sorry, I'll have to get back to you as soon as it's up again. I think it wasn't the issue before. đŸ™‚
16 replies
WWasp-lang
Created by mb23 on 7/11/2024 in #đŸ™‹questions
Updating and redeploying Postgres DB in Railway
@sodic Thanks a bunch for your response, really appreciate it! What's your frontend URL? https://client-production-1a2d.up.railway.app/, redirected to custom domain: https://contentforce.ai What's your backend URL? https://server-production-549d.up.railway.app Did you set WASP_WEB_CLIENT_URL to the frontend URL on the backend server? Yes, WASP_WEB_CLIENT_URL=https://contentforce.ai Are you using Custom APIs or only Operations (queries and actions)? I'm only using the stripeWebhook API of the OpenSaaS template. But besides that, I've added additional Wasp jobs. Here's my variables set up for client and server: client: PORT=8043 REACT_APP_API_URL=https://server-production-549d.up.railway.app REACT_APP_STRIPE_CUSTOMER_PORTAL=... server: ADMIN_EMAILS=... DATABASE_URL=${{Postgres.DATABASE_URL}} HOBBY_SUBSCRIPTION_PRICE_ID= JWT_SECRET=... PORT=8043 PRO_SUBSCRIPTION_PRICE_ID=... SECRET_KEY=... SENDGRID_API_KEY=... STRIPE_KEY=... STRIPE_WEBHOOK_SECRET=... WASP_SERVER_URL=https://server-production-549d.up.railway.app WASP_WEB_CLIENT_URL=https://contentforce.ai
16 replies
WWasp-lang
Created by mb23 on 7/8/2024 in #đŸ™‹questions
Issue with creating jobs/workers
@kapa.ai
11 replies
WWasp-lang
Created by mb23 on 7/8/2024 in #đŸ™‹questions
Issue with creating jobs/workers
I'm loading the createOutlineJob function in my app client page: import { createOutlineJob } from 'wasp/server/jobs'; Is this wrong? How should i import the worker function instead?
11 replies
WWasp-lang
Created by mb23 on 7/5/2024 in #đŸ™‹questions
user.subscriptionStatus and user.subscriptionTier are not set
Ok nevermind, I had to use the Stripe CLI listener in development. Works now!
5 replies
WWasp-lang
Created by mb23 on 7/2/2024 in #đŸ™‹questions
Where can I find the code for the login form?
@miho great, thanks!
8 replies