相关疑难解决方法(0)

如何从s3到节点expressjs服务静态网站?

目前,我使用的app.use(express.static('public'))文件位于我的node js express应用程序的公用文件夹中,并且运行良好。但是,我想将这些文件(index.html等)存储在我的s3存储桶中(以便多个应用程序可以使用此网站)。我试过了

app.get('/', function(req, res) {
    res.sendfile('link-to-s3-file/index.html'); 
 });
Run Code Online (Sandbox Code Playgroud)

没有成功...

amazon-s3 amazon-web-services node.js express

6
推荐指数
1
解决办法
2489
查看次数

标签 统计

amazon-s3 ×1

amazon-web-services ×1

express ×1

node.js ×1