Skip to content

Commit

Permalink
feat: build express package
Browse files Browse the repository at this point in the history
  • Loading branch information
Dobby.free committed Apr 15, 2024
1 parent 284110b commit f589ec3
Show file tree
Hide file tree
Showing 11 changed files with 80 additions and 2 deletions.
8 changes: 8 additions & 0 deletions packages/express/.idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions packages/express/.idea/express.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions packages/express/.idea/git_toolbox_prj.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions packages/express/.idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions packages/express/.idea/jsLinters/eslint.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions packages/express/.idea/material_theme_project_new.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions packages/express/.idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions packages/express/.idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions packages/express/.idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion packages/express/lib/config.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import express from 'express';
import expressSession from 'express-session';
import expressSession, { SessionData } from 'express-session';
import log4js from 'log4js';
export interface IExpressConfig {
project_name?: string;
Expand All @@ -13,6 +13,7 @@ export interface IExpressConfig {
password?: string;
};
ttl: number;
custom_ttl?: (sess: SessionData) => number;
secret: string;
name?: string;
save_uninitialized?: boolean;
Expand Down
2 changes: 1 addition & 1 deletion packages/express/lib/create_app.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ function setupSession(app, config) {
});
const session_store = new connect_redis_1.default({
client: redis_client,
ttl: config.session.ttl,
ttl: config.session.custom_ttl ?? config.session.ttl,
});
session_store.on('disconnect', () => {
console.log('RedisStore for express is disconnected. Exit the process...');
Expand Down

0 comments on commit f589ec3

Please sign in to comment.