From 53b4a52ba1583a2a211aa86714c3b9fdc6755f32 Mon Sep 17 00:00:00 2001 From: Lucas Dohmen Date: Wed, 18 Jun 2014 18:02:30 +0200 Subject: [PATCH] Explain Foxx's dev-app-path option --- .../Users/Foxx/DevelopingAnApplication.mdpp | 22 ++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/Documentation/Books/Users/Foxx/DevelopingAnApplication.mdpp b/Documentation/Books/Users/Foxx/DevelopingAnApplication.mdpp index f9eb8152d0..346551cb36 100644 --- a/Documentation/Books/Users/Foxx/DevelopingAnApplication.mdpp +++ b/Documentation/Books/Users/Foxx/DevelopingAnApplication.mdpp @@ -42,9 +42,10 @@ provides a few mechanisms for this: !SUBSECTION Development Mode If you start ArangoDB with the option *--javascript.dev-app-path* followed by -the path to a directory containing a manifest file and the path to the -database, you are starting ArangoDB in development mode with the application -loaded. This means that on every request: +the path to an app directory (see below) and then the path to the database, +you are starting ArangoDB in development mode with the application loaded. + +This means that on every request: 1. All routes are dropped 2. All module caches are flushed @@ -57,6 +58,21 @@ This means that you do not have to restart ArangoDB if you change anything in your app. It is of course not meant for production, because the reloading makes the app relatively slow. +The app directory has to be structured as follows: + +``` +└── databases + ├── _system + │   ├── foxx_app_1 + │   ├── foxx_app_2 + │   └── foxx_app_3 + └── my_db +    └── foxx_app_4 +``` + +In this case you would have four foxx apps booted, three in the `_system` database +and one in the `my_db` database. + !SUBSECTION Production Mode To run a Foxx app in production first copy your app code to the directory given in