Run a node.js server from Geany

牧云@^-^@ 提交于 2019-12-04 11:06:22

问题


A simple question: Is it possible to configure the Geany IDE so that Node.js servers can be run directly from Geany using the "Run" button?


回答1:


When inside a JS file, go to Build > Set Build Commands, there should be a section title Execute commands. To use node to execute your files, put: node "%f" in the "Execute" command textbox.

When you change this, any .js files you are editing will run node in the virtual terminal when you hit F5.

If you want to set up an entire project to run the server whenever you're working somewhere within a given directory structure, you'll have to mess with project-level configuration. (something I don't usually bother with) My solution here just gives you a quick way to execute a single JS file without using an external terminal.

UPDATE: node "%f" seems to be legacy, but nodejs "%f" works



来源:https://stackoverflow.com/questions/12464679/run-a-node-js-server-from-geany

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!