Virgile
Virgile
PPrisma
Created by simnJS on 8/5/2024 in #help-and-questions
Issue with prisma optimize
What do you think @Nurul (Prisma) ? So that when people have the same issue they know how to fix it. I plan to make other videos using NestJS and Prisma, and I would like an easy fix in case people use paid features Because I think it’s the same with accelerate
22 replies
PPrisma
Created by simnJS on 8/5/2024 in #help-and-questions
Issue with prisma optimize
I think we can do this yeah. But I think you should try it as well and add it to the docs, create a nestjs docs page ? For class base prisma
22 replies
PPrisma
Created by simnJS on 8/5/2024 in #help-and-questions
Issue with prisma optimize
Hi Nurul, I didn't quite understand your answer here. Sorry to notify you again but would really enjoy trying Prisma Optimize !
22 replies
PPrisma
Created by simnJS on 8/5/2024 in #help-and-questions
Issue with prisma optimize
here is the code
export class PrismaService extends PrismaClient {
constructor(
@Inject(appConfigFeature.KEY)
private readonly appConfiguration: ConfigType<typeof appConfig>,
) {
super();
this.$extends(withOptimize())
}
export class PrismaService extends PrismaClient {
constructor(
@Inject(appConfigFeature.KEY)
private readonly appConfiguration: ConfigType<typeof appConfig>,
) {
super();
this.$extends(withOptimize())
}
22 replies
PPrisma
Created by simnJS on 8/5/2024 in #help-and-questions
Issue with prisma optimize
Can you provide a code snippet please ? I don't understand
22 replies
PPrisma
Created by simnJS on 8/5/2024 in #help-and-questions
Issue with prisma optimize
thank you Nurul 🙂 appreciated
22 replies
PPrisma
Created by simnJS on 8/5/2024 in #help-and-questions
Issue with prisma optimize
https://www.loom.com/share/e1c6bfca5f4647a185124a78ddb34d7b here is a Loom where I explain the stack used
22 replies
PPrisma
Created by simnJS on 8/5/2024 in #help-and-questions
Issue with prisma optimize
Hi Nurul, I'm having an issue with Optimize version 0.10.1 : I pressed record, I initialized optimize and I don't see any rows displayed. It seems to work though as, if I press 'stop recording', it tells me it cannot record because no of recording. Any suggestions please ?
22 replies
PPrisma
Created by Virgile on 5/17/2024 in #help-and-questions
How to authenticate Prisma Optimize in a VPS ?
Alright it does not seem to work in my project. Using NestJS with a service
import { Inject, Injectable } from "@nestjs/common";
import type { ConfigType } from "@nestjs/config";
import { PrismaClient } from "@prisma/client";

@Injectable()
export class PrismaService extends PrismaClient {
constructor() {
super();
this.$extends(withOptimize());
}
}
import { Inject, Injectable } from "@nestjs/common";
import type { ConfigType } from "@nestjs/config";
import { PrismaClient } from "@prisma/client";

@Injectable()
export class PrismaService extends PrismaClient {
constructor() {
super();
this.$extends(withOptimize());
}
}
I've tried using it directly before calling a resource, like this.prisma.$extends(withOptimize()).users.findMany(). It's getting me the users, showing console.logs to preview the data. But there is no data in the dashboard
8 replies
PPrisma
Created by Virgile on 5/17/2024 in #help-and-questions
How to authenticate Prisma Optimize in a VPS ?
thank you for replying 🙂
8 replies
PPrisma
Created by Virgile on 5/17/2024 in #help-and-questions
How to authenticate Prisma Optimize in a VPS ?
So here's what I did : Installed xdg-utils because you apparently need it to run the command
sudo apt-get update
sudo apt-get install xdg-utils
sudo apt-get update
sudo apt-get install xdg-utils
Then it successfully kept the CLI running and sent me a link, redirecting to 127.0.0.1. Except I'd like to connect to my VPS server. So I replaced 127.0.0.1 with server IP, but I could not access it. I'm using EC2 on AWS with security groups allowing connections from all ports. But I'm using Caddy Server, which apparently does not allow any connection not configured in its config file. Since the port changes everytime I ran the command, I cannot predict in advance the port to open.
8 replies