[英]Arango/Foxx server static file
经过查看,尽管Arango文档无法找到有关如何处理html文件的明确信息。 这是我计划使用Arango来存储文件的唯一情况,因为Nginx的工作要好得多,但是Arango保留需要知道该页面是否合法的数据。
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
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.