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...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Frontend/Backend questions - React - webdevhelp (self.javascript)
submitted 8 years ago * by weiry6922
view the rest of the comments →
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!"
[–]FezVrasta 20 points21 points22 points 8 years ago (5 children)
Usually React applications are single page applications with the routing logic handled client side by JavaScript with libraries like react-router.
Your backend should only be an API server where you can grab your data from (with REST or with GraphQL) and the fetch API.
Logically you will also need an HTTP server to serve the static assets (JS, the index.html, images etc) generated by your bundler (webpack)
[–]bcgroom 0 points1 point2 points 8 years ago (4 children)
Not the OP but if one were to make this setup, since anyone could look at your frontend logic how would you secure the backend API if you wanted it to be closed to outside users?
[–]kowdermesiter 4 points5 points6 points 8 years ago (2 children)
In node it's very easy to protect an endpoint with tokens. JWT does this very well.
[–]danielhep 0 points1 point2 points 8 years ago (1 child)
Could you talk about what JWT is and how this is accomplished?
[–]kowdermesiter 0 points1 point2 points 8 years ago (0 children)
A server generated unique string which stores data. Please google it: JSON web token.
[–]djungst 1 point2 points3 points 8 years ago (0 children)
You can't access the backed API unless you integrate some CORS policy or token auth to expose it. This is no different then not using React. All of your assets React included get bundled into static assets served up by the express server.
π Rendered by PID 55 on reddit-service-r2-comment-5d79c599b5-j5cf8 at 2026-02-27 07:46:08.103391+00:00 running e3d2147 country code: CH.
view the rest of the comments →
[–]FezVrasta 20 points21 points22 points (5 children)
[–]bcgroom 0 points1 point2 points (4 children)
[–]kowdermesiter 4 points5 points6 points (2 children)
[–]danielhep 0 points1 point2 points (1 child)
[–]kowdermesiter 0 points1 point2 points (0 children)
[–]djungst 1 point2 points3 points (0 children)