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);
当前,建议的方法是使用fs模块从磁盘加载文件内容: https : //docs.arangodb.com/ModuleFs/index.html
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.