Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Run a node.js server from Geany

Tags:

node.js

geany

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?

like image 768
Anderson Green Avatar asked Sep 17 '12 17:09

Anderson Green


1 Answers

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

like image 157
Dominic Barnes Avatar answered Nov 15 '22 20:11

Dominic Barnes