What you do is an request to the endpoint where the data comes from in your backend and return that, then you make an axios call to the backend to get it on the frontend. Thats all Answer from heesell on reddit.com
🌐
Reddit
reddit.com › r/webdev › doing an api request in the frontend or backend? what's best practices?
r/webdev on Reddit: Doing an API request in the frontend or backend? What's best practices?
February 5, 2022 -

I was wondering because someone told me not to expose your keys in the front end even if you store it in an env file. But if you do the api request in the backend you have to do another axios request to get it in the front end. So anyone know what's the right or best method? 2 request for more security vs just 1?

Discussions

node.js - Should I make 3rd party API calls in backend or frontend? - Stack Overflow
I have an API and that API needs some data from the Microsft Graph API. I was thinking of implementing an endpoint in my API to refresh the token and use that token to make calls from the frontend.... More on stackoverflow.com
🌐 stackoverflow.com
angularjs - External API calls from the frontend or backend? - Stack Overflow
I would say it depend what kind of thirdpartyservice and what you use them for :) All frontend dependencies should be call from frontend and all backend dependencies from backend. ... If you don't want to process the response from the API, then front-end will do. More on stackoverflow.com
🌐 stackoverflow.com
Question: How does the front-end integrate with the back-end in programming?
On July 1st, a change to Reddit's API pricing will come into effect. Several developers of commercial third-party apps have announced that this change will compel them to shut down their apps. At least one accessibility-focused non-commercial third party app will continue to be available free of charge. If you want to express your strong disagreement with the API pricing change or with Reddit's response to the backlash, you may want to consider the following options: Limiting your involvement with Reddit, or Temporarily refraining from using Reddit Cancelling your subscription of Reddit Premium as a way to voice your protest. I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns. More on reddit.com
🌐 r/learnprogramming
35
207
July 28, 2023
Newbie to Express- how to make api calls from frontend JS to backend
I'm working on a plain Javascript project that consumes data the Nasa Mars Rover api, and using Immutable Js, pure functions and functional programming displays images and info to the page using a ... More on stackoverflow.com
🌐 stackoverflow.com
🌐
YouTube
youtube.com › watch
Frontend application calling backend api using fetch - YouTube
In this tutorial, we follow our previous tutorial in which we created a simple backend API in NodeJs using Hapi library, to show the results of our backend c...
Published   January 4, 2019
🌐
Quora
quora.com › How-do-you-make-rest-API-calls-from-front-end-to-backend-when-information-is-inside-other-microservices-microservices-software-engineering
How to make rest API calls from front-end to backend when information is inside other microservices (microservices, software engineering) - Quora
Answer (1 of 2): There are a few ways to make REST API calls from front-end to backend when information is inside other microservices. One way is to use a front-end proxy server that can communicate with the microservices on behalf of the front-end. ...
🌐
Medium
medium.com › swlh › making-use-of-apis-in-your-front-end-c168e343bea3
Making Use of APIs in Your Front End | by Patrick Pierre | The Startup | Medium
September 24, 2020 - A promise is a special JavaScript Object, that will allow us to receive our data from the fetch request if it is successful or execute some snippet of code if the requested data fails to get back to us. Since our fetch returns a promise object, we have access to the following three methods: .then(callback) which is is used when the promise is fulfilled (success)
🌐
Passage
docs.passage.id › embedded-login › examples-by-framework › connecting-to-api-backend
Connecting to API Backend | Passage
November 16, 2023 - Set the auth origin to the domain of your frontend application · Set the redirect URL to the correct path for your app (e.g. "/" or "/dashboard") Generate an API Key on the settings page for use in the backend API code
Find elsewhere
🌐
Medium
medium.com › @adityagaba1322 › streamlining-backend-frontend-integration-a-quick-guide-145eca3cca05
“Streamlining Backend-Frontend Integration: A Quick Guide” | by Adityagaba | Medium
November 21, 2023 - Choose a backend framework or technology such as Node.js with Express or Django for Python. Define routes and endpoints for your API using the chosen framework. Implement business logic and database operations within the API endpoints. Use JavaScript’s fetch API or libraries like Axios to send HTTP requests from the frontend.
🌐
GeeksforGeeks
geeksforgeeks.org › gblog › how-to-connect-front-end-and-backend
How to Connect Front End and Backend - GeeksforGeeks
October 22, 2025 - It generally uses HTTP request ... format. The backend exposes different endpoints for multiple functionalities, and then frontend makes calls to these endpoints in order to retrieve or manipulate data.
🌐
Reddit
reddit.com › r/learnprogramming › question: how does the front-end integrate with the back-end in programming?
r/learnprogramming on Reddit: Question: How does the front-end integrate with the back-end in programming?
July 28, 2023 -

I get that HTML, CSS, and Javascript are front-end languages, but how do we connect the back-end and front-end?

I’ve been using R recently and an R-library called Shiny to help make basic webpages out of my R code. I was wondering how that compares to all these other tools for other languages that all seem related to this front-end/back-end integration.

I've heard React, Django, Angular, Node.js, Vue.js, Express.js, jQuery, etc. get thrown around and I don't really what they are.

In short, what are they? Are they libraries? Programs? How do they compare to Shiny? How do they relate to each other? Thanks!

Bonus questions: PHP vs. HTML/CSS/JS, and what is an API

Top answer
1 of 23
183
So, Javascript can be both a backend and frontend language. Node is a javascript runtime and it's what allows you to run javascript in a server instead of just on the browser. React, Angular and Vue are javascript frameworks for frontend development. Django and Express are backend frameworks. Django for python, Express for javascript. Django is sort of a batteries included framework in the sense that it comes by default with many things you might need, like an authentication system, an ORM (which is a way to make it easier for your code to interact with a database) and a pretty good admin page where you can do things like see, add, change, delete objects in the database, among other things. A framework, btw, is sort of a way to do things that comes with code already written for things you're likely to use, so you don't have to do everything yourself. For example, if I don't use something like django, I'd have to write all the code myself to handle routing (what do the different paths in your applicagion do), handle users, authentication, security, and a thousand other things. So frameworks help yo save time. Not all frameworks are as batteries included as Django, Express, for example, is a lot more barebones. An API is how two programs communicate with each other. In cases where the backend and the frontend are separate (which doesn't need to be the case, you could just generate all your html from the backend), the way it usually works is that the backend exposes an API to the frontend, which the frontend then uses to get the data it needs to render a page.
2 of 23
47
I get that HTML, CSS, and Javascript are front-end languages, but how do we connect the back-end and front-end? Your backend will be a server your frontend communicates with via an API. In short, what are they? Are they libraries? Programs? How do they compare to Shiny? How do they relate to each other? Thanks! Those are all different technologies and not all of them overlap. Some are runtimes, some frontend frameworks, some libraries. It might be more helpful to Google each one and ask a more specific question for what you need help understanding. Bonus questions: PHP vs. HTML/CSS/JS, and what is an API PHP is a server-side (backend) scripting language, where as HTML/CSS/JS make up the core frontend languages. An API is an abstraction that allows for standardized communication between software components. For a real world analogy think of your stovetop. You have a knob that lets you turn it off/on/adjust temperature. You have no idea how the internals work, but you’re provided an interface (the knob) that allows you to communicate with the stove.
🌐
Stack Overflow
stackoverflow.com › questions › 70882611 › newbie-to-express-how-to-make-api-calls-from-frontend-js-to-backend
Newbie to Express- how to make api calls from frontend JS to backend
// Example test API // http://localhost:3000/rovers/curiosity app.get('/rovers/:rover', async (req, res) => { const rover = req.params.rover; try { let images = await fetch (`https://api.nasa.gov/mars- photos/api/v1/rovers/${rover}/latest_photos?api_key=${apiKey}`) .then((res) => res.json()); res.send({images}); } catch (error) {console.log('error:', error); } }); Another example from https://expressjs.com/en/guide/routing.html
🌐
Medium
medium.com › @aswathymsanoop › practical-illustration-frontend-backend-connection-via-restful-api-communication-9f6930bc8e57
Practical Illustration -Frontend-Backend Connection via RESTful API Communication | by ASWATHY M S | Medium
December 20, 2023 - This server provides a basic API for managing a collection of books, supporting operations to retrieve all books, add a new book, and delete a book by its ID. The server runs on port 3000. To interact with this server, you can use tools like curl, Postman, or write a frontend application that communicates with these endpoints using AJAX or a library like Axios.
🌐
Passage
docs.passage.id › complete › connecting-to-api-backend
Connecting to API Backend | Passage by 1Password Docs
Set the auth origin to the domain of your frontend application · Set the redirect URL to the correct path for your app (e.g. ”/” or “/dashboard”) Generate an API Key on the settings page for use in the backend API code
🌐
Hashnode
hashnode.com › post › should-i-make-3rd-party-api-calls-from-my-frontend-or-the-backend-cizv0ttaz00ats453twjy2ugn
Should I make 3rd party API calls from my frontend or the backend? - Hashnode
April 3, 2017 - I'm not sure whether I should make my 3rd party network calls from the frontend or the backend. Both seems to have their advantages. I will like to know what limitaions you have experienced using either approach.
🌐
Quora
quora.com › Where-does-an-API-come-in-on-front-end-and-back-end
Where does an API come in on front-end and back-end? - Quora
Our backend server will have two routes: /home - sends this button to the browser along with JavaScript code that will retrieve data from the second route when the button is hit and find a way to visually display the information it receives. /api/getUserMetrics - sends the fatty metrics to the browser when called.
🌐
Medium
kapucuonur.medium.com › integrating-frontend-and-backend-with-apis-a-comprehensive-guide-9d296eef2e33
Integrating Frontend and Backend with APIs: A Comprehensive Guide | by Onur Kapucu | Medium
April 19, 2025 - API Request: An arrow from the frontend points towards the backend, labeled “API Request”. This represents the HTTP requests (GET, POST, etc.) sent from the frontend to fetch or send data.
🌐
Lightrun
lightrun.com › answers › oppia-oppia-the-backend-api-calls-in-the-frontend-should-only-happen-through-services
The backend api calls in the frontend should only happen through services
HTTPs calls in frontend should only happen through *backend ... We are expecting to make all the https class from a backend-api.services (like this question-backend-api.service.ts).Read more >
🌐
Frontend Mentor
frontendmentor.io › articles › integrating-with-apis-a-beginners-guide-for-frontend-developers-u_xfEadBc-
API Integration Guide for Frontend Developers
March 13, 2024 - Learn to integrate APIs as a frontend developer. Fetch data, handle responses, and work with REST APIs.
🌐
Bubble
forum.bubble.io › need help › apis
Front end API call->move API data to backend->run backend workflow to change DB thing - APIs - Bubble Forum
January 4, 2023 - Hi I am trying to call a third party API to get data and then transfer that data to backend workflow to change fields in a DB thing. The API data is displayed in RG and when user selects RG the data in the specific RG c…