Files
marketing-app/server/node_modules/connect-sqlite3/Readme.md
fahed 35d84b6bff Marketing Hub: RBAC, i18n (AR/EN), tasks overhaul, team/user merge, tutorial
Features:
- Full RBAC with 3 roles (superadmin/manager/contributor)
- Ownership tracking on posts, tasks, campaigns, projects
- Task system: assign to anyone, filter combobox, visibility scoping
- Team members merged into users table (single source of truth)
- Post thumbnails on kanban cards from attachments
- Publication link validation before publishing
- Interactive onboarding tutorial with Settings restart
- Full Arabic/English i18n with RTL layout support
- Language toggle in sidebar, IBM Plex Sans Arabic font
- Brand-based visibility filtering for non-superadmins
- Manager can only create contributors
- Profile completion flow for new users
- Cookie-based sessions (express-session + SQLite)
2026-02-08 20:46:58 +03:00

57 lines
1.5 KiB
Markdown

# Connect SQLite3
connect-sqlite3 is a SQLite3 session store modeled after the TJ's connect-redis store.
## Installation
```sh
$ npm install connect-sqlite3
```
## Options
- `table='sessions'` Database table name
- `db='sessionsDB'` Database file name (defaults to table name)
- `dir='.'` Directory to save '<db>.db' file
- `createDirIfNotExists='false'` Directory 'dir' is created recursively if not exists
- `concurrentDB='false'` Enables [WAL](https://www.sqlite.org/wal.html) mode (defaults to false)
## Usage
```js
var connect = require('connect'),
SQLiteStore = require('connect-sqlite3')(connect);
connect.createServer(
connect.cookieParser(),
connect.session({ store: new SQLiteStore, secret: 'your secret' })
);
```
with express
```js
3.x:
var SQLiteStore = require('connect-sqlite3')(express);
4.x:
var session = require('express-session');
var SQLiteStore = require('connect-sqlite3')(session);
app.configure(function() {
app.set('views', __dirname + '/views');
app.set('view engine', 'ejs');
app.use(express.bodyParser());
app.use(express.methodOverride());
app.use(express.cookieParser());
app.use(session({
store: new SQLiteStore,
secret: 'your secret',
cookie: { maxAge: 7 * 24 * 60 * 60 * 1000 } // 1 week
}));
app.use(app.router);
app.use(express.static(__dirname + '/public'));
});
```
## Test
```sh
$ npm test
```