I'm trying to run a custom Foxx app.
Directory structure:
- ~/src/js/foxx
- databases
- _system
- my_app ( From the docs )
- test
- myapp ( My custom app )
- manifest.json
- app.js
- myapp ( My custom app )
- _system
- databases
myapp manifest.json
{
"name": "myapp",
"version": "0.0.1",
"author": "ccraig",
"controllers": {
"/": "app.js"
}
}
myapp app.js
(function() {
"use strict";
var Foxx = require("org/arangodb/foxx"),
controller = new Foxx.Controller(applicationContext);
controller.get("/", function(req, res) {
res.set("Content-Type", "text/plain");
res.body = "Hello world";
});
}());
command to start server
arangod --javascript.dev-app-path ~/src/js/foxx ~/tmp/arango_db
I then point my browser to:
http://localhost:8529/_db/test/dev/myapp/
and receive this response:
{"error":true,"code":404,"errorNum":404,"errorMessage":"unknown path 'dev/myapp/index.html'"}
The sample app I copied from the docs under _system (my_app) works just fine for me.
I'm also able to run the aardvark admin as well, which is how I created the "test" database. I do notice, though, that it says "inactive" on its icon, while _system says "active", not sure if that's relevant.
Also, in the admin, "myapp" shows up in the the test database's Application list.