2025-08-25 20:04:55 +02:00
2025-08-25 20:04:55 +02:00
2025-08-21 22:24:30 +02:00
2025-08-21 22:24:30 +02:00
2025-08-20 22:45:39 +02:00
2025-08-25 20:04:55 +02:00
2025-08-25 20:04:55 +02:00
2025-08-22 16:25:06 +02:00
2025-08-21 22:24:30 +02:00

InMemory Sessions

A Service to store Sessions in Memory.

Install

npm i --save @apihub24/in-memory-sessions

Dependencies

Exported Injection Keys
@apihub24/session_service

Usage

// NestJs usage
import { InMemorySessionsModule } from "@apihub24/in-memory-sessions";

@Module({
  imports: [InMemorySessionsModule.forRoot()]
})
...

// Other usage
import { InMemorySessionsModule } from "@apihub24/in-memory-sessions";

const sessionService = new InMemorySessionService();
Function Description
create(account: IAccount): Promise Create a new Session from a IAccount and returns it
getBy(filter: (account: IAccount) => boolean): Promise<ISession[]> get a ISession by a IAccount filter
getById(sessionId: string): Promise get a ISession by a session id. the returned ISession can be null if not exists
remove(sessionId: string): Promise remove the ISession by a session id.
Description
No description provided
Readme MIT 282 KiB
Languages
TypeScript 100%