---
url: /runcobo/faq.md
description: >-
  Answers to common questions about Runcobo — GET request bodies, databases, the
  welcome page, deployment, ORMs, WebSockets and server-sent events, sessions
  and more.
---

# FAQ

\[\[toc]]

## Requests

### Does a `GET` request accept a JSON body?

Yes. [`validate`](/guide/contracts#reading-input-with-validate) reads the body of every request, `GET` and `HEAD` included, with the same rules as `POST`:

```sh
curl -X GET localhost:3000/search -H 'Content-Type: application/json' -d '{"q":"crystal","tags":["web"]}'
```

HTTP doesn't forbid a `GET` body, but it gives it no defined meaning, so some proxies, caches and client libraries drop it (browsers' `fetch` refuses to send one). Use it for clients you control, such as service-to-service calls. For public APIs and anything cached, prefer the query string — arrays as repeated keys (`?tag=a&tag=b`) — or a `POST` endpoint such as `POST /posts/search`.

### Where do path, query and body values go when they share a name?

A path parameter always wins, a JSON body value replaces a query value, and a form value sent alongside a query value fails with `multiple_values`. See [Reading input](/guide/contracts#reading-input-with-validate).

### How do I tell "not sent" from `null` in a `PATCH`?

Each contract field has a `<name>_present?` method. See [Missing vs null](/guide/contracts#missing-vs-null) and the [partial update recipe](/guide/query-recipes#partial-updates).

### How big can a request body be?

1 MiB by default; larger bodies get a `413`. Change it per action — see [Body size limit](/guide/uploads#body-size-limit).

## Projects

### What is the "You're on Runcobo!" page?

A new application shows it at `/` until it declares its first route, so `bin/cobo dev` has something to open right after [`cobo init`](/cli/#cobo-init). Add any action and it's gone; an application with routes never shows it.

### Can I use Runcobo without a database?

Yes. Run `bin/cobo init --database none`, or skip `cobo init` entirely and write a single file that calls `Runcobo.start`, as in the [Quick Start](/guide/quick-start).

### Which databases are supported?

PostgreSQL, MySQL and SQLite, through [crsql](/guide/database). `sqlc.yaml` declares the engine, and every `cobo db` command follows it.

### Is there an ORM with models and associations?

No. You write SQL, and `bin/cobo generate` turns each named query into a typed Crystal method. Nothing is loaded lazily, so there are no hidden queries — see [Database Access](/guide/database) and [Avoiding N+1 Queries](/guide/n-plus-one).

### Do I need sqlc or the `cobo` CLI in production?

No. sqlc and crsql run only when you generate code, and the generated file is committed. The compiled server is a single binary. `cobo` is a development and deployment tool: your deploy job uses it to apply migrations — see [Deployment](/guide/deployment#_3-migrate-the-database).

### Where does each file go?

Each endpoint is an action, a contract and a template side by side in a business-area folder. See [Project Structure](/guide/project-structure), or the [blog tutorial](/guide/example) for a complete application.

## Features

### Does Runcobo support WebSockets?

Yes, and server-sent events too. Declare a route with `ws "/path"` and accept the connection with `websocket do |socket| ... end`, or stream events from a `get` route with `stream do |events| ... end`. Filters and `validate` run first, and open connections are closed on shutdown — see [Real-time](/guide/realtime).

### Are there sessions or cookie authentication?

There's no built-in session store. Read and write cookies through `context.response.cookies` ([Responses](/guide/responses#headers-cookies-and-status)) and authenticate in a `before` filter. If you use cookies for HTML forms, add CSRF protection — see [Security](/guide/security#csrf-and-cookies).

### Background jobs?

Runcobo doesn't include a job queue. Run recurring work as a [project task](/cli/#cobo-task) from your scheduler, or use a queue library in a separate process that shares your store.

### Can I render HTML, not only JSON?

Yes. [Water](/guide/views#water) templates render HTML with layouts and partials, and escape text for you. Jbuilder renders JSON. Both are compiled into the binary.

## Development

### Why does `cobo dev` take a few seconds after each save?

Crystal compiles the whole program before running it. `cobo dev` rebuilds in development mode, which is much faster than `--release`, and keeps the previous version running until the new one compiles. See [`cobo dev`](/cli/#cobo-dev).

### How do I see all routes?

```sh
bin/cobo routes
```

### Where are the API docs?

The generated API reference for every class and method is at [API Reference](https://runcobo.github.io/runcobo/api/).

## Coming from another framework

See the guides for [Rails](/migrate/rails), [Kemal](/migrate/kemal) and [Lucky](/migrate/lucky). Each maps the concepts you know to Runcobo's.

## Something else?

[Open an issue](https://github.com/runcobo/runcobo/issues) on GitHub.
