Node is a Javascript runtime, that allows you to use JS as a server-side language. So with Node you will be able to set up a web server that serves static HTML files under different routes.
You can also use that node server to set up an API for querying a database or process data dynamically on the server side before sending the HTTP response to the Frontend. Express.js is often used to set up an API on a node server. You can create a CRUD API (create, read, update, delete) for example.
It would be very helpful, if you shared some of your code and / or explain more about what you want to achieve. 👍
let's say you use a React frontend with your Node backend. Then your backend might have a route /messages on which you can perform a GET request from your frontend, e.g.
fetch('https://yournodebackend.com/messages)
.then(response => response.json())
.then(jsonResponse => console.log(jsonResponse)) // or do whatever you like
If your node backend supports more routes and request types like POST, PUT, DELETE, you can query them from your frontend similarly.
Hope, this could go in the right direction for your purpose..! Happy hacking 😄
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Node is a Javascript runtime, that allows you to use JS as a server-side language. So with Node you will be able to set up a web server that serves static HTML files under different routes.
You can also use that node server to set up an API for querying a database or process data dynamically on the server side before sending the HTTP response to the Frontend. Express.js is often used to set up an API on a node server. You can create a CRUD API (create, read, update, delete) for example.
It would be very helpful, if you shared some of your code and / or explain more about what you want to achieve. 👍
All I want to do is link Node (as a backend) to a frontend (any GUI toolkit).
I'm making a Discord bot to be used as a an application (separate from Discord, but serving a similar purpose to).
let's say you use a React frontend with your Node backend. Then your backend might have a route
/messages
on which you can perform a GET request from your frontend, e.g.If your node backend supports more routes and request types like POST, PUT, DELETE, you can query them from your frontend similarly.
Hope, this could go in the right direction for your purpose..! Happy hacking 😄