Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CJS server side example code? #71

Open
nyck33 opened this issue Oct 25, 2023 · 3 comments
Open

CJS server side example code? #71

nyck33 opened this issue Oct 25, 2023 · 3 comments

Comments

@nyck33
Copy link

nyck33 commented Oct 25, 2023

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.

@rentallect
Copy link
Member

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,

@nyck33
Copy link
Author

nyck33 commented Oct 25, 2023

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

@nyck33
Copy link
Author

nyck33 commented Oct 30, 2023

@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 nyck33 closed this as completed Oct 30, 2023
@nyck33 nyck33 reopened this Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants