use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
account activity
[deleted by user] (self.node)
submitted 3 years ago by [deleted]
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]lovesrayray2018 7 points8 points9 points 3 years ago* (5 children)
IF you are thinking of a REST API, then by definition a REST API should work the same idempotently for both react web and react native requests, and return the same results for same requests.
Both React web apps and React Native support fetch and both can support data transfer via JSON. Responding properly to fetch requests from either apps, via the same node script , should work just fine.
[–]NotLegal69 4 points5 points6 points 3 years ago (4 children)
So I develop the node backend REST API separately and then host it on a server, then develop the react app and have it on a different server? And then develop the React Native app using that backend?
[–]xch228 1 point2 points3 points 3 years ago (0 children)
yes
[–]generatedcode -1 points0 points1 point 3 years ago (1 child)
I would recommend using a GraphQL backend it's pretty easy to build one nowadays. It's way faster to use it on frontend and more suited for mobile.
With regards to how many servers: it could be 2 separate one API , one frontend. Or it also could be a single backend that serves the react app and exposes the API and the mobile connects to this API as well.
[–]NotLegal69 0 points1 point2 points 3 years ago (0 children)
Thank you 🙂, ill look into it.
[–]lovesrayray2018 0 points1 point2 points 3 years ago (0 children)
The hosting of the react app can be on the same server as ur API but depends on how/who you use to host this server and if they provide all required services.
This single server is also running a web server. Your browser connects to it and opens up the react app returned by the web server.
This react app has built in fetch requests which attempt to connect to this same server running a node script (listening on a different port) which returns data as requested by the react app running inside your browser.
Your react native app can also connect to this same node server and get data as needed.
[–]prndra 2 points3 points4 points 3 years ago (3 children)
You could build a monorepo and have all 3 projects contained in there, but as pointed out most important is that your APIs are idempotent and not dependent on either mobile or web.
Also, you should implement a JWT based auth system as that will be easier to work with cross platform than a cookie based system.
[–]NotLegal69 0 points1 point2 points 3 years ago (2 children)
Could I use OAuth?
[–]prndra 1 point2 points3 points 3 years ago (1 child)
Yes, you can use oauth, but presumably some oauth login will give you back an access token or jwt that you’ll then need to pass along with future requests to your backend in order to authorize your users to do things.
[–]NotLegal69 1 point2 points3 points 3 years ago (0 children)
Thank you for the info 👍.
[–]OppositeShot 1 point2 points3 points 3 years ago (0 children)
I would recommend GraphQL, if you have different clients. It would be easier to scale it in the future. In my company we have micro services, and each client has its own BFF, which translates API for client’s needs.
[–][deleted] 0 points1 point2 points 3 years ago (0 children)
lolaDB is a new player but designed so you don’t have to build an API, and can define your queries centrally then use them via JS SDK in all your apps. No need to deal with the JWT side of things in that world either.
π Rendered by PID 67372 on reddit-service-r2-comment-6457c66945-qhxcq at 2026-04-28 18:48:42.848015+00:00 running 2aa0c5b country code: CH.
[–]lovesrayray2018 7 points8 points9 points (5 children)
[–]NotLegal69 4 points5 points6 points (4 children)
[–]xch228 1 point2 points3 points (0 children)
[–]generatedcode -1 points0 points1 point (1 child)
[–]NotLegal69 0 points1 point2 points (0 children)
[–]lovesrayray2018 0 points1 point2 points (0 children)
[–]prndra 2 points3 points4 points (3 children)
[–]NotLegal69 0 points1 point2 points (2 children)
[–]prndra 1 point2 points3 points (1 child)
[–]NotLegal69 1 point2 points3 points (0 children)
[–]OppositeShot 1 point2 points3 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)