1

I have a web client working against a Node.js app. Now I need to update and integrate an existing C# into this scenario.

My C# generates a JSON object and I need to consume it in the Node.js app.

What's the simplest way do achieve this?

6
  • node.js app is a server? Commented Mar 19, 2019 at 10:30
  • 1
    You have several options. Communicate via a REST API or some other protocol like RTP, web sockets, etc. Commented Mar 19, 2019 at 10:30
  • I'd venture that this question is too open-ended. You need to provide details about your existing setup ("web client working against a Node.js app") because it may be as simple as adding a handler to the node app (whatever that is) and posting data to it. On the other hand, if the app needs to authenticate so that others can't send junk to the same endpoint, you're dealing with a much nastier bag'o'worms. More detail please. Commented Mar 19, 2019 at 10:46
  • @paradox - yes. (at)Alex - I am aware that there are many options, I wanted a simple code sample that does it. Commented Mar 19, 2019 at 10:52
  • @spender - this one is fortunately in a closed network, and security is not consideration at this point. I just need the simple example as I'm a newby in node. My missing part is just moving the json from C# to a node listener Commented Mar 19, 2019 at 10:55

1 Answer 1

2

You can do it in many options, and you have a lot of examples in stackoverflow and in google.

Like @Alex said, you can do it via REST API, protocol like RTP, web sockets (for me this is the easiest way).

You have a lot of examples and module's like for example:

Examples:

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.