Python在connect to s上显示网页

2024-05-12 21:47:06 发布

您现在位置:Python中文网/ 问答频道 /正文

我用JavaScript构建了一个服务器,当你连接到它时,它会显示一个网页。服务器在连接时使用发送了htm文件

app.get('/', function (req, res) {
    res.sendfile('index.htm');
});

Python中有类似的函数吗


Tags: 文件函数服务器app网页getindexfunction