手抄报 安全手抄报 手抄报内容 手抄报图片 英语手抄报 清明节手抄报 节约用水手抄报

node怎么使用html文件

时间:2024-10-19 18:24:41

1、首先在html文件中创建一个p标签。

node怎么使用html文件

2、然后通过http模块的createServer方法和fs模块的readFile方法使用html文件。

node怎么使用html文件

3、运行js文件后,在浏览器的搜索框中输入127.0.0.1:8000。

node怎么使用html文件

4、查看结果。

node怎么使用html文件
© 手抄报圈