MVP Web app with call to local Node server using JWT to get data
Unanswered
Himalayan posted this in #help-forum
HimalayanOP
Hello everyone. I'm currently working on an MVP for a web dashboard using Next and have been provided a local node server that sends back some mock data when requested.
The data will initially be used to populate a table, but further down the line I imagine the infrastructure of the app will change to handle user profiles etc.
As part of the request there is a requirement of a JWT, which is obtained via a request prior to fetching this data which will return the token.
I was wondering if someone could please explain how to set this up in Next. I understand the process of what needs to be done, but I'm not sure where to put the API calls in the file system and whether or not I should be using a package like SWR to handle this? Thanks
The data will initially be used to populate a table, but further down the line I imagine the infrastructure of the app will change to handle user profiles etc.
As part of the request there is a requirement of a JWT, which is obtained via a request prior to fetching this data which will return the token.
I was wondering if someone could please explain how to set this up in Next. I understand the process of what needs to be done, but I'm not sure where to put the API calls in the file system and whether or not I should be using a package like SWR to handle this? Thanks