Commands and configuration
The npm scripts of the app and the keys of its config file.
On this page
Run the commands in the folder of the app.
API
command
npm start
Starts the app on port 8000 in debug mode: it restarts when a file changes.
npm start
command
npm run release
Starts the app on port 8000 in release mode, for production.
npm run release
command
npm run backup
Writes a backup of the database and the uploaded images to backups/.
npm run backup
command
npm run restore -- <file.backup>
Restores a backup. Stop the app first; the current folder is kept aside.
npm run restore -- <file.backup>
command
npm run export-documents
For the developers of Documents: exports the example project to private/documents.json.
npm run export-documents
config
builtin : false
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.
builtin : false
config
database : postgresql://user:password@localhost:5432/documents
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 ….
database : postgresql://user:password@localhost:5432/documents
config
revisions : 50
In the config file, how many revisions of each document the history keeps (50 by default).
revisions : 50
config
url : https://docs.example.com
In the config file: the public address of the site when it is not set in Settings. Empty: the address of the first request.
url : https://docs.example.com