Skip to content

Commit ed88924

Browse files
Copilotmtrezza
andcommitted
Remove example files and simplify README with session store list
Co-authored-by: mtrezza <5673677+mtrezza@users.noreply.github.com>
1 parent 3b69608 commit ed88924

File tree

4 files changed

+6
-440
lines changed

4 files changed

+6
-440
lines changed

README.md

Lines changed: 6 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -809,60 +809,14 @@ When deploying Parse Dashboard with multiple replicas behind a load balancer, yo
809809

810810
#### Using a Custom Session Store
811811

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.
813813

814-
**Step 1:** Install the required dependencies:
814+
**Suggested Session Stores:**
815815

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-
const express = require('express');
824-
const ParseDashboard = require('parse-dashboard');
825-
const { createClient } = require('redis');
826-
const RedisStore = require('connect-redis').default;
827-
828-
// Create Redis client
829-
const redisClient = createClient({
830-
url: 'redis://localhost:6379'
831-
});
832-
833-
redisClient.connect().catch(console.error);
834-
835-
// Create Redis store
836-
const sessionStore = new RedisStore({
837-
client: redisClient,
838-
prefix: 'parse-dashboard:',
839-
});
840-
841-
// Configure Parse Dashboard with the session store
842-
const dashboard = new ParseDashboard({
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-
const app = 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
866820

867821
**Important Notes:**
868822

examples/README.md

Lines changed: 0 additions & 132 deletions
This file was deleted.

examples/mongodb-session-store.js

Lines changed: 0 additions & 120 deletions
This file was deleted.

0 commit comments

Comments
 (0)