Alepha Server Cookies

Type-safe HTTP cookie parsing and serialization for servers.

Installation

This package is part of the Alepha framework and can be installed via the all-in-one package:

npm install alepha

Alternatively, you can install it individually:

npm install @alepha/core @alepha/server-cookies

Module

Provides HTTP cookie management capabilities for server requests and responses with type-safe cookie descriptors.

The server-cookies module enables declarative cookie handling using the $cookie descriptor on class properties. It offers automatic cookie parsing, secure cookie configuration, and seamless integration with server routes for managing user sessions, preferences, and authentication tokens.

API Reference

Descriptors

$cookie()

Declares a type-safe, configurable HTTP cookie. This descriptor provides methods to get, set, and delete the cookie within the server request/response cycle.

Table of contents