Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] purpose of server.ts file in the repo #43

Open
piscopancer opened this issue Nov 2, 2024 · 0 comments
Open

[Question] purpose of server.ts file in the repo #43

piscopancer opened this issue Nov 2, 2024 · 0 comments

Comments

@piscopancer
Copy link

piscopancer commented Nov 2, 2024

What's the purpose of the file under example/src/server.ts? Do you need a server because prisma is required to work on the server? I can understand it, I have created many nextjs apps and ofc I have seen prisma fail to work from the client code, so I used Server Actions to make server do prisma stuff and return data to the client safely.

But when it comes to react native there's no such thing as a server bcs the whole app is client. It seems to me that this file creates an "artificial server" on a client and all prisma calls are made on the behalf of this "server" that runs on the user's phone in this current app. Do I understand it correctly?

🐱

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant