Skip to content

Commit

Permalink
fix: updated README and don't bundle commitlint.config.js
Browse files Browse the repository at this point in the history
  • Loading branch information
seekayel committed Nov 30, 2022
1 parent a3347a2 commit aa70744
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
.*
test/

commitlint.config.js
13 changes: 2 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,29 +14,20 @@ Express middleware that stores sessions in DynamoDB tables for Cyclic apps. Adap
`npm install @cyclic.sh/session-store`

```js
const {DynamoDBStore} = require('@cyclic.sh/session-store')
const {CyclicSessionStore} = require('@cyclic.sh/session-store')

const dynamoOpts = {
table: {
name: process.env.CYCLIC_DB,
hashKey: 'pk',
hashPrefix: 'sid_',
sortKey: 'sk',
create: false
},
// dynamoConfig: {
// endpoint: process.env.AWS_DYNAMO_ENDPOINT,
// },
keepExpired: false,
touchInterval: oneHourMs,
ttl: oneDayMs
}

// console.log(typeof DynamoDBStore)

app.set('trust-proxy', 1)
app.use(session({
store: new DynamoDBStore(dynamoOpts),
store: new CyclicSessionStore(dynamoOpts),
secret: process.env.SESSION_SECRET || 'THIS-IS-NOT-A-SECRET',
resave: false,
saveUninitialized: false,
Expand Down

0 comments on commit aa70744

Please sign in to comment.