const { Turnkey } = require("@turnkey/sdk-server");
// This config contains parameters including base URLs, API credentials, and org ID
const turnkeyConfig = JSON.parse(fs.readFileSync("./turnkey.json", "utf8"));
// Use the config to instantiate a Turnkey Client
const turnkeyServerClient = new Turnkey(turnkeyConfig);
// You're all set to create a server!
const turnkeyProxyHandler = turnkeyServerClient.expressProxyHandler({});
app.post("/apiProxy", turnkeyProxyHandler);
app.listen(PORT, () => {
console.log(`Server running on port ${PORT}`);
});