Skip to content

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

@piscopancer

Description

@piscopancer

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?

🐱

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions