ziti-sdk-nodejs icon indicating copy to clipboard operation
ziti-sdk-nodejs copied to clipboard

CJS server side example code?

Open nyck33 opened this issue 2 years ago • 3 comments

ChatGPT gave me something like

const express = require('express').default;
const ziti = require('@openziti/ziti-sdk-nodejs').default;

// Your existing ExpressJS setup
const app = express();
// ... (other middleware, routes, etc.)

// Wrap your existing ExpressJS app with Ziti
const zitiApp = ziti.express(app, 'yourZitiServiceName');

// Listen
zitiApp.listen(3000, () => {
  console.log('Server running on http://localhost:3000/');
});

when I told it I want to integrate into Owasp Juice Shop app. But is there a more concrete example.

nyck33 avatar Oct 25 '23 11:10 nyck33

Hi @nyck33

We are currently in the middle of efforts related to releasing the next version of the NodeJS SDK. Once that becomes available, as part of our testing efforts, I plan to integrate it into the Owasp Juice Shop app. I'll ping you back here once that has been accomplished,

rentallect avatar Oct 25 '23 15:10 rentallect

Hi, what a coincident! That's definitely a great litmus test.

nyck33 avatar Oct 25 '23 22:10 nyck33

@rentallect Hi Curt, because I wanted to create log files of normal activity on the Juice Shop, I edited the source using Cursor IDE (had it consider the entire code base) so that product quantities are unlimited. Here is the repo: https://github.com/nyck33/juice_shop_cursor_win11.git The next step would be to refactor the code base to use a real SQL database rather than SQLite so that I can also showcase OpenZiti protecting a database like in some of videos on the OpenZiti YouTube Channel.
The logs will be used to train NVIDIA Morpheus AI models for my OpenZiti + Morpheus Zero Trust Stack I wrote about here:

https://www.linkedin.com/pulse/synergies-between-openziti-nvidia-morpheus-nobutaka-kim/?trackingId=tplXHipWSY%2BAGBOdMNnDfQ%3D%3D

nyck33 avatar Oct 30 '23 02:10 nyck33