Working with Session Cookies when using Server Connect API

Hey all,

I’ve been using Wappler to build some amazing systems and features for our organization, it has really increased our innovation having the ability to Rapidly deploy something.

I’m currently working on a NodeJS application that logs into one of our wholesale provider’s systems to fetch data, which requires the ability to store session cookies.

Using the API Action in Server Connect, is there a way that I can enable cookies, and/or specify the location of a cookies file that cookie data can get saved to and read from?

I’ve got a couple of other PHP built apps I previously built in Wappler and enabled the Curl cookie jar, but wanted to know if this was something that we could do in express?

server or client side?

In a Node.js application using Express (which Wappler often utilizes), you can manage cookies using the cookie-parser middleware. To enable cookie support, you typically include and configure this middleware in your Express app.

Here’s a simplified example:
const express = require(‘express’);
const cookieParser = require(‘cookie-parser’);
const app = express();

// Enable cookie parsing
app.use(cookieParser());

// Your routes and other middleware go here

app.listen(3000, () => {
console.log(‘Server is running on port 3000’);
});