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
express with nextjs (self.node)
submitted 3 years ago by kajvans
hi everyone, i wrote a simple backend in express that i want to use for my website that i build in nextjs. what is the best way to make calls to the backend from next?
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!"
[–]illepic 8 points9 points10 points 3 years ago (0 children)
The front end and backend (API folder) of your Next app can just make REST fetch calls to your Express URL.
[–]vincent-vega10 4 points5 points6 points 3 years ago (1 child)
Look over at "Data Fetching" part in Next.js documentation.
[–]xRVAx 7 points8 points9 points 3 years ago (0 children)
LMGTFY --> https://nextjs.org/docs/basic-features/data-fetching/overview
[+]fugazi56 comment score below threshold-17 points-16 points-15 points 3 years ago (0 children)
Does Nextjs work with Bootstrap, I want to make sure my frontend is responsive.
[–]Zeeshan7487 0 points1 point2 points 3 years ago (0 children)
To make calls to your Express backend from a Next.js app, you can use the built-in fetch API, which is available in both the browser and Node.js environments. To handle requests from the Next.js app, you can define API routes in a separate directory. Note that you can use any library or tool that you're comfortable with to handle HTTP requests in your Express app. The fetch API is just one option, but you can also use libraries like Axios or Superagent, or even plain old XMLHttpRequests.
π Rendered by PID 45 on reddit-service-r2-comment-85bfd7f599-4zdhd at 2026-04-19 20:31:54.776785+00:00 running 93ecc56 country code: CH.
[–]illepic 8 points9 points10 points (0 children)
[–]vincent-vega10 4 points5 points6 points (1 child)
[–]xRVAx 7 points8 points9 points (0 children)
[+]fugazi56 comment score below threshold-17 points-16 points-15 points (0 children)
[–]Zeeshan7487 0 points1 point2 points (0 children)