---
title: Overview
description: Where A2 keeps your session histories.
---

```ts server/orders.ts
import { createServer } from 'experimental-a2/server'
import { redis } from 'experimental-a2/store-redis'
import { orders } from '@/contracts'

export const ordersServer = createServer({
  contract: orders,
  store: redis({ url: process.env.REDIS_URL }),
  handlers: {
    /* ... */
  },
})
```

| Store | Use it for |
| --- | --- |
| [Redis](/stores/redis) | Production (recommended) |
| [Redis over HTTP](/stores/redis-http) | Production, when your provider only offers a REST API |
| [Postgres](/stores/postgres) | Production |
| [SQLite](/stores/sqlite) | Development: the default |
| [Memory](/stores/memory) | Tests: the default when `NODE_ENV=test` |

When you omit `store`, development gets SQLite, so state survives `next dev`
restarts, and tests get memory. Production has no default, on purpose: the
server throws `STORE_NOT_CONFIGURED` at startup rather than write events to a
filesystem that evaporates.

A store holds A2's session histories. It doesn't connect A2 to your
application tables; see
[Sessions and your database](/contract/sessions#sessions-and-your-database).

Servers with handlers or timers also need a [scheduler](/schedulers/overview).
