-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
Node.js v22.22.0
Using the example code
import ziti from '@openziti/ziti-sdk-nodejs';
import express from 'express';
//const app = express();
console.log("Ziti Express Config")
let app = ziti.express( express, 'NodeJS Express Service' );
const port = 9090;
// Somehow provide path to identity file, e.g. via env var
const zitiIdentityFile = ;
//// Authenticate ourselves onto the Ziti network
console.log("Ziti Init Starting")
await ziti.init( zitiIdentityFile )
.catch(( err ) => { console.log(err)/* probably exit */ });
console.log("Ziti Init Finished")
// Define a route for GET requests to the root URL
app.get('/', (req, res) => {
res.send('Hello World from Express!');
});
// Start the server
app.listen(port, () => {
console.log("Example app listening at http://localhost:" + port);
});
The following Error occurs
node:_http_common:122
return parser.onIncoming(incoming, shouldKeepAlive);
^
TypeError: parser.onIncoming is not a function
at HTTPParser.parserOnHeadersComplete (node:_http_common:122:17)
at socketOnData (node:_http_server:865:22)
at ZitiSocket.emit (node:events:519:28)
at ZitiSocket.captureData (/2TBSSD/ziti-node/example-lambda-netfoundr-v22/node_modules/@openziti/ziti-sdk-nodejs/lib/ziti-socket.js:57:18)
at Server.on_listen_client_data (/2TBSSD/ziti-node/example-lambda-netfoundr-v22/node_modules/@openziti/ziti-sdk-nodejs/lib/express-listener.js:81:12)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels