2

After look though the Arango doc's could not find clear as to how to server a html file. This is the only case where I planning using Arango to server a file as Nginx does much better job but Arango hold the data need to known if this page should be legal.

controller.get('/:id', function (req, res){
  var id = req.urlParameters.id;
  if(res.json(db.tire_user.byExample({"uid":id}).toArray()[0]);){
      //here needs to server the static html file
  }
})
.pathParam('id', userIdSchema);
kevin
  • 63
  • 4

1 Answers1

3

Currently the proposed way is to load the contents of the file from disk using the fs module: https://docs.arangodb.com/ModuleFs/index.html

dothebart
  • 5,972
  • 16
  • 40