{"id":13781290,"url":"https://github.com/thinkjs/think-session-file","last_synced_at":"2025-04-10T19:37:10.391Z","repository":{"id":65374732,"uuid":"64713891","full_name":"thinkjs/think-session-file","owner":"thinkjs","description":"File session for ThinkJS 3.x","archived":false,"fork":false,"pushed_at":"2021-07-01T23:56:26.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-16T05:17:14.366Z","etag":null,"topics":["file","session","think-adapter","thinkjs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thinkjs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-08-02T01:31:05.000Z","updated_at":"2021-07-01T23:56:20.000Z","dependencies_parsed_at":"2023-01-20T01:25:23.953Z","dependency_job_id":null,"html_url":"https://github.com/thinkjs/think-session-file","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinkjs%2Fthink-session-file","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinkjs%2Fthink-session-file/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinkjs%2Fthink-session-file/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinkjs%2Fthink-session-file/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thinkjs","download_url":"https://codeload.github.com/thinkjs/think-session-file/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248281415,"owners_count":21077423,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["file","session","think-adapter","thinkjs"],"created_at":"2024-08-03T18:01:24.639Z","updated_at":"2025-04-10T19:37:10.367Z","avatar_url":"https://github.com/thinkjs.png","language":"JavaScript","readme":"# think-session-file\n\nFile session for ThinkJS\n\n[![Build Status](https://img.shields.io/travis/thinkjs/think-session-file/master.svg?style=flat-square)](https://travis-ci.org/thinkjs/think-session-file)\n[![Coverage Status](https://img.shields.io/coveralls/thinkjs/think-session-file/master.svg?style=flat-square)](https://coveralls.io/github/thinkjs/think-session-file?branch=master)\n[![npm](https://img.shields.io/npm/v/think-session-file.svg?colorB=brightgreen\u0026style=flat-square)](https://www.npmjs.com/package/think-session-file)\n\n## Install\n\n```\nnpm install think-session-file\n```\n\n## How to use\n\nconfig file `src/config/adapter.js`, add options:\n\n```js\nconst fileSession = require('think-session-file');\nexports.session = {\n  type: 'file',\n  common: {\n    cookie: {\n      name: 'thinkjs',\n      //maxAge: '',\n      //expires: '',\n      path: '/',  //a string indicating the path of the cookie\n      //domain: '',\n      //secure: false,\n      //keys: [],\n      httpOnly: true,\n      sameSite: false,\n      signed: false,\n      overwrite: false\n    }\n  },\n  file: {\n    handle: fileSession,\n    sessionPath: path.join(think.ROOT_PATH, 'runtime/session'), //file session store root path\n    maxAge: '1d', //session timeout, default is 1 day\n    autoUpdate: false, //update expires time when get session, default is false\n  }\n}\n```\n","funding_links":[],"categories":["Adapters"],"sub_categories":["session"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthinkjs%2Fthink-session-file","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthinkjs%2Fthink-session-file","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthinkjs%2Fthink-session-file/lists"}