Next.js Discord

Discord Forum

Converting ssr website to android app

Answered
Silver Marten posted this in #help-forum
Open in Discord
Silver MartenOP
I have a website (next js ssr) i want to create mobile application is there any way i can you the same website to build it . I dont want to create whole new native client and server side. Is there anyway to convert it(something like capacitor will work or not. Also if i cant use the same codebase can I utilise the current website server side to acces its server from another client side so I dont have to make a new server side component
Answered by @ts-ignore
yes and iirc you don't have to setup CORS for an app to make requests
View full answer

15 Replies

Silver MartenOP
I want to publish it as an app on app stores, so i was thinking if i can get native like feel or not. If like i cant actually convert it using capacitor (maybe because its ssr not static) i can create an client side app and utilising the same integrated backend functions
Well to get "native feel" you obv need native stuff
Silver MartenOP
I looked at this capacitor js which like converts website to native like feel ig
But dont know if it supports ssr
you can use React Native, you can reuse quite a lot of code there
Silver MartenOP
So what will happen to the server side thing
Silver MartenOP
Like rn i use nextjs + react and the backend is in the same code and i use server side propes and routing etc do i have to build seperate client(react native) and also build seperate backend for it
Silver MartenOP
Can i just send the request to url/api/xyz from another project?
yes and iirc you don't have to setup CORS for an app to make requests
Answer
Silver MartenOP
After like enabling cors or other stuff to allow
@@ts-ignore yes and iirc you don't have to setup CORS for an app to make requests
Silver MartenOP
Ohk ig i have to build whole client side ui from scracth than :/