---
title: Commands and configuration
project: Documents
version: v1
section: reference
language: en
license: MIT
url: https://totaljs.es/docs/documents/1/reference/commands/
updated: 2026-11-20T06:51:57.969Z
---

# Commands and configuration

> The npm scripts of the app and the keys of its config file.

Run the commands in the folder of the app.

## API

### npm start

Type: `command`

Starts the app on port 8000 in debug mode: it restarts when a file changes.

### npm run release

Type: `command`

Starts the app on port 8000 in release mode, for production.

### npm run backup

Type: `command`

Writes a backup of the database and the uploaded images to backups/.

### npm run restore -- <file.backup>

Type: `command`

Restores a backup. Stop the app first; the current folder is kept aside.

### npm run export-documents

Type: `command`

For the developers of Documents: exports the example project to private/documents.json.

### builtin : false

Type: `config`

In the config file: `false` turns off the example project; `edit` (for the developers of Documents) unlocks it and stops updating it, so it can be edited and exported.

### database : postgresql://user:password@localhost:5432/documents

Type: `config`

In the config file: the connection to the PostgreSQL database. It is required; on an empty database Documents creates its tables. The value can also be written as `hex …` or `base64 …`.

### revisions : 50

Type: `config`

In the config file, how many revisions of each document the history keeps (50 by default).

### url : https://docs.example.com

Type: `config`

In the config file: the public address of the site when it is not set in Settings. Empty: the address of the first request.
