Node.js for relaying information from a third-party API

0

What I want to do with Node.js is basically LISTEN to an API (jSON) and process the results to send to multiple clients.

Example:

WhatIwanttoknowis:DoesthisMyVPScomputerhavetoexistanywayandruntheserverapplicationfor24hours?

IthoughtofsomethinglikeaCrontabtoreplaceVPS,butIthinkI'mwrongaboutthis,becauseNode.jsshouldstay"LISTENING" to the API and not accessing it through multiple requests in a given range of time.

Could I leave the script running on the server forever?

I see several notifications apps that collect third-party data and wonder if that's how they work.

    
asked by anonymous 26.08.2017 / 09:21

1 answer

0

Search for socket.io , it maintains a two-way connection ( websocket ) with any client that connects, so you can create private rooms, login mechanisms, etc.

You can send messages from the client to the server and vice versa.

    
27.08.2017 / 15:13