Next.js Discord

Discord Forum

Next.js using an external backend (.NET)

Unanswered
Gulf menhaden posted this in #help-forum
Open in Discord
Gulf menhadenOP
Hello guys. I know that we commonly see an unique application using Node inside Next.js environment. However, I've decided to build a separate backend app from Next.js using .NET

I'm struggling with API integration. For example, if I need to integrate a login API endpoint, I would have to make the request and set the token in headers. Nevertheless, to set the token in headers, I must be using 'use server' directive. How can I achieve with Next.js? Do I need to create a router handler?

It seems confusing because because I'd use the server to consume an endpoint from another server.

I've attached some images to help you understand.

0 Replies