Some Node.js Examples?

Hey everyone! I’m really new here, I want to integrate OpenZiti with my Node.js app, I tried using the SDK but couldn’t find any helpful examples, can someone please help me with some Node.js examples? Thanks!

Hi @monizb! Welcome to the community! I’m not the best person for node help but I’ll ping some people and maybe we can get you some help.

Do you just need some kind of very simple client-side type app? Are you looking to host a service? Some information about what you’re trying to do would be helpful. Or are you just exploring and looking for any kind of sample?

Again, welcome!

GitHub - openziti/ziti-gitlab-webhook and GitHub - openziti/ziti-webhook-action: Github Action to post a Webhook over a Ziti network use the Node.js SDK

Hey @TheLumberjack ! Yes, I’m looking to host my REST API + Websocket service built on top of Node.js, I was trying to use the SDK examples but I couldn’t really understand them, any kind of sample built on top of Node so that I can reference it for mine thanks!

Curious question @monizb, when deploying your app server, do you intend to have a reverse proxy in front of it? In terms of examples, this HTTP agent is built on Node.JS GitHub - openziti/ziti-http-agent. @curt built that and is our expert on node, he may chime in further.

At this time, the Node.js SDK doesn’t support ‘Bind’ of services. You can run a ziti-edge-tunnel on your server though. If you wanted to use node as the server, that’s what I’d tell you to do. ziti-http-agent probably isn’t ready for you to try out just yet.

I would make a node client app, with one identity, and a ziti-edge-tunnel running with another id and make a service that offloads the ziti traffic to “localhost”. You could also run the server in go/java/C/etc but… just not node at this time.