How do i listen to data posted to webhook in react? [closed] - javascript

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
I have setup a webhook, that facebook posts data to. Basically its just a test webhook using https://webhook.site/.
Now how do i reflect this data on my client side (I am using react using create-react-app, but even a generic solution without using create react app will do ), How do i listen to this data, so i can refesh my frontend and show this data on my frontend.

You need a server that can listen to incoming requests. From this server you could establish a websocket connection to your frontend to reflect these changes in real time.
Some resources:
Hello World Express (Node.js)
Get Started with socket.io (Websocket wrapper)

Related

Communication between my react-native file and server.js [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I'm working on a project with react native, express and MongoDB.
When I click the submit button, I want my string to be passed to server.js where I can implement my get-request. Basically, I'm unable to create communication between react-native-js file and node-js file. I'm using react-native-router-flux for navigation.
Procedure One : you need to develop the backend using node+express
the backend should expose the api endpoints like this ->
http://serverRunningurl/auth/usersignin
Procedure Two : you need to access those endpoints via your react-native side..
lots of client side http libraries out there , use axios,
Try this reference first : The MERN Stack Tutorial

Node server for electron app [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I'm creating an aplication with Electron + React. The app has to allow users to save files on the server (something like Google Drive).
Now, im building the server side with express but i dont now how to send files to the client. How could i do it?
Would it be nice to use an FTP server instead of node?
Thanks.
Well there are 2 options regardless:
1) You just send your app unique link of the file witch expires after some time.
2) You stream the file to electron directly(Just google node streaming.
Thats about it.

Connecting a Lua client to a Socket.io NodeJS server? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 5 years ago.
Improve this question
I have a Node JS server running socket.io able to communicate with other clients using the socket.io-client package. I'm trying to now, write a client in Lua to connect to my socket.io server. Then when it's connected, be able to send and receive events. Any help would be highly appreciated.
If you want to try only with socket IO server then try https://github.com/ignacio/LuaNode-Socket.IO.
Else you have to go with some native websocket implementation.
Also have a look at this SO
Have you tried the LuaSocket module? https://luarocks.org/modules/luarocks/luasocket

end to end encryption with javascript and php [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I'm looking to implement end-to-end encryption for messages sent between users in my Laravel app. I want to encrypt these messages in a way that they are only viewable by the sender and receiver (just like in secure messaging apps like WhatsApp). No one else can read them, including admins or dbas.
How would I go about doing this?
I should also mention that the messages will be sent through the browser to the server by a JavaScript AJAX request and pushed to the other user by Node.js / socket.io setup.
Would be helpful if you have posted some examples that you have tried. Here are the steps that you can follow to achieve it.
Step 1. You will have to establish a private chat between Client and server. An example can be seen here: Creating a private chat between a key using a node.js and socket.io
Step 2. Add encryption/decryption logic for the messages at Client side. Here is a logic for the same: https://github.com/sytelus/CryptoJS

I want to listen to changes on the server and update my web page accordingly. How can I do this with Javascript? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I am building a web page that pulls data from a server and displays it. The data can change and I want to be able to change the data on the webpage without refreshing the page and not use setInterval. How can I do this with Javascript? Can this be done with Backbone.js?
Thanks
you could use a setInterval that goes to the server and pulls new updates and update the DOM.
If you're using HTML5 then use web sockets which will actually have the server push the updates to the connected client.
If you're writing in .NET then I really really recommend checking out SignalR which will make life easier.

Categories

Resources