*We get an error message uploading the zipped service file "greeting" test
app ran well prior to that*
https://docs.arangodb.com/3.1/Manual/Foxx/GettingStarted.html
This is what we have now
*manifest.json*
* "engines": { "arangodb": "^3.0.0" }, "main": "index.js",
"scripts": { "setup": "scripts/setup.js" }}*
*setup.js in scripts folder*
*'use strict';const db = require('@arangodb').db;const collectionName =
'Objects';*
*index.js*
*'use strict';const createRouter = require('@arangodb/foxx/router');const
router = createRouter();module.context.use(router);const db =
require('@arangodb').db;const errors = require('@arangodb').errors;const
foxxColl = db._collection('Objects');const DOC_NOT_FOUND =
errors.ERROR_ARANGO_DOCUMENT_NOT_FOUND.code;const joi =
require('joi');const aql = require('@arangodb').aql;router.get('/entries',
function (req, res) { const names = db._query(aql` FOR O IN
${foxxColl} RETURN O.name `);
res.send(names);}).response(joi.array().items(
joi.string().required()).required(), 'List of Object
names').summary('Objects').description('Object names');*
What is missing ?
*ERROR MESSAGE *
Services: 3103. failed to invoke module File:
C:\Windows\TEMP\apps\tmp-2664-3958057735\index.js Cause: SyntaxError:
missing ) after argument list at Module._compile (C:\Program
Files\ArangoDB3
3.1.21\/usr/share/arangodb3/js/common/bootstrap/modules.js:580:23) at
Object.Module._extensions..js (C:\Program Files\ArangoDB3
3.1.21\/usr/share/arangodb3/js/common/bootstrap/modules.js:604:12) at
Module.load (C:\Program Files\ArangoDB3
3.1.21\/usr/share/arangodb3/js/common/bootstrap/modules.js:539:36) at
FoxxService.run (c:\Program Files\ArangoDB3
3.1.21\usr\share\arangodb3\js\server\modules\@arangodb\foxx\service.js:435:14)
at exports.routeService (c:\Program Files\ArangoDB3
3.1.21\usr\share\arangodb3\js\server\modules\@arangodb\foxx\routing.js:153:40)
at _validateService (c:\Program Files\ArangoDB3
3.1.21\usr\share\arangodb3\js\server\modules\@arangodb\foxx\manager.js:1087:7)
at Object.upgrade (c:\Program Files\ArangoDB3
3.1.21\usr\share\arangodb3\js\server\modules\@arangodb\foxx\manager.js:1418:3)
at Middleware. (C:\Program Files\ArangoDB3
3.1.21\usr\share\arangodb3\js\apps\system\_admin\aardvark\APP\foxxes.js:97:29)
at next (c:\Program Files\ArangoDB3
3.1.21\usr\share\arangodb3\js\server\modules\@arangodb\foxx\router\tree.js:414:15)
at next (c:\Program Files\ArangoDB3
3.1.21\usr\share\arangodb3\js\server\modules\@arangodb\foxx\router\tree.js:410:7)
--
You received this message because you are subscribed to the Google Groups
"ArangoDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.