OpenStageControl / Node 4 max8 (Cycling74)

I would like to run 'OpenStage control' from 'node.js'. node.js is a complex script for me. Has anyone ever tried to do this?

I don't understand how to edit a script with this line of code:

ELECTRON_RUN_AS_NODE=1 open-stage-control path/to/open-stage-control/resources/app/ [options]

Also following this!
As far as I understood we need a custom module to read files in Node.js but currently it is beyond my capabilities.

It's not very clear what you expect from running open stage control with node. It's only a way to run the app without any interface (a browser is needed to display the client app) that can save some resources (only for the server part, the client app won't be affected and is usually the heaviest part), but it needs to be run from a terminal and adapted depending on your system (os, location of open stage control, etc).

I understood this part of how OSC works. Cycling74 has implemented the Node JavaScript framework in its applications (MAX 8 and Max for Live for Ableton).

I'm starting to understand OSC interface building (I come from Lemur environment).

I would like to be able to launch the server directly from my Max8 interface or my Max for live currencies directly from live from ableton via the Node. But I'm not experienced enough in this area. the documentation is weak and learning a new framework such as Node seems like a big expense of energy for what little I use.

J'avais bien compris cette partie du fonctionnement d'OSC. Cycling74 a implanté le framework Node JavaScript dans ses applications (MAX 8 et Max for Live pour Ableton).

Je commence à comprendre la construction de l'interface OSC (Je viens de l'environnement Lemur).

J'aimerais en effet pouvoir lancer le serveur directement depuis mon interface Max8 ou mes devises Max for live directement depuis live d'ableton via le Framework Node. Mais je ne suis pas assez expérimenté dans ce domaine. la documentation est faible et apprendre un nouveau framework tel que Node me semble être une dépense d'énergie importante pour le peu que j'utilise.

Well then I suppose it depends on what max exposes exactly : if you can run node yourself then all you need is to run a command such as:

node path/to/open-stage-control/resources/app
# or, with some options for example
node path/to/open-stage-control/resources/app --debug --port 9000

If you only have a node environment to work with (meaning a context where node already launched and you need to write a script there to launch o-s-c) it's a bit tricky and not to be considered as a canonical nor supported (o-s-c is not a node library per say):

// attempt to insert options in command line
// option names and values must be separated
process.argv.push('--debug', '--port', 9000)
// load o-s-c
require('/path/to/open-stage-control/resources/app')

It does indeed look like an over-complicated way to run o-s-c and the interest of doing so seems rather thin to me. Besides, launching it from max may not help to debug if you're having issues later.