You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+6-52Lines changed: 6 additions & 52 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -809,60 +809,14 @@ When deploying Parse Dashboard with multiple replicas behind a load balancer, yo
809
809
810
810
#### Using a Custom Session Store
811
811
812
-
Parse Dashboard supports using any session store compatible with [express-session](https://github.com/expressjs/session), such as Redis, MongoDB, or Memcached. Here's an example using Redis with `connect-redis`:
812
+
Parse Dashboard supports using any session store compatible with [express-session](https://github.com/expressjs/session). The `sessionStore` option must be configured programmatically when initializing the dashboard.
813
813
814
-
**Step 1:** Install the required dependencies:
814
+
**Suggested Session Stores:**
815
815
816
-
```bash
817
-
npm install connect-redis redis
818
-
```
819
-
820
-
**Step 2:** Configure your Parse Dashboard with a session store:
821
-
822
-
```javascript
823
-
constexpress=require('express');
824
-
constParseDashboard=require('parse-dashboard');
825
-
const { createClient } =require('redis');
826
-
constRedisStore=require('connect-redis').default;
827
-
828
-
// Create Redis client
829
-
constredisClient=createClient({
830
-
url:'redis://localhost:6379'
831
-
});
832
-
833
-
redisClient.connect().catch(console.error);
834
-
835
-
// Create Redis store
836
-
constsessionStore=newRedisStore({
837
-
client: redisClient,
838
-
prefix:'parse-dashboard:',
839
-
});
840
-
841
-
// Configure Parse Dashboard with the session store
842
-
constdashboard=newParseDashboard({
843
-
apps: [
844
-
{
845
-
serverURL:'http://localhost:1337/parse',
846
-
appId:'myAppId',
847
-
masterKey:'myMasterKey',
848
-
appName:'MyApp'
849
-
}
850
-
],
851
-
users: [
852
-
{
853
-
user:'admin',
854
-
pass:'password'
855
-
}
856
-
],
857
-
cookieSessionSecret:'your-session-secret', // Required for multi-replica
858
-
}, {
859
-
sessionStore: sessionStore // Pass the session store
860
-
});
861
-
862
-
constapp=express();
863
-
app.use('/dashboard', dashboard);
864
-
app.listen(4040);
865
-
```
816
+
-[connect-redis](https://www.npmjs.com/package/connect-redis) - Redis session store
817
+
-[connect-mongo](https://www.npmjs.com/package/connect-mongo) - MongoDB session store
818
+
-[connect-pg-simple](https://www.npmjs.com/package/connect-pg-simple) - PostgreSQL session store
819
+
-[memorystore](https://www.npmjs.com/package/memorystore) - Memory session store with TTL support
0 commit comments