简体   繁体   English

在节点中运行简单的html或js文件

[英]run simple html or js file in node

I've created node folder and install the node server which is working just fine I want to add to it some simple html file or js file and run it, what is the simplest way to do it ? 我已经创建了节点文件夹并安装了可以正常工作的节点服务器,我想向其中添加一些简单的html文件或js文件并运行它,最简单的方法是什么?

Thanks! 谢谢!

Either get nodemon through npm, and then in your terminal run nodemon [your file here] or you can use node [your file here] . 通过npm获取nodemon,然后在终端中运行nodemon [your file here]或者您可以使用node [your file here]

Nodemon is nice because it will restart your server when you change the files within it. Nodemon很不错,因为它会在您更改服务器中的文件时重新启动服务器。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用节点运行简单的js文件 - Run simple js file using node 如何使用 node.js 运行 html 文件 - How to run html file using node js node.js不读取并返回简单的HTML文件 - node.js does not read and return simple HTML file 是否有可能运行一个简单的html在android上调用js文件? - is it possible to run a simple html that calls a js file on android? Node.js简单服务器在html文件(routes.js)中嵌入的javascript有问题 - Node.js simple server having issues with embedded javascript in html file (routes.js) 单击popup.html上的按钮时运行background.js文件的简单方法 - simple way to run background.js file when a button on popup.html is clicked 我可以在Node JS Web服务器中运行php文件或html文件吗? - Can i run a php file or a html file in a node js web server? 如何通过单击 html 中的按钮来运行节点 js 文件(进行 api 调用并将数据放入工作表中) - How to run a node js file (that makes a api call and puts data into a sheet) by clicking on a button in html 仅当用户在html中选择文件后,才在node.js中运行脚本 - Run the script in node.js only after user select file in html 使用量角器完成运行后,发送使用节点js附加HTML文件的电子邮件报告 - Send email report with HTML file attached using node js after the run is complete using protractor
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM