<p dir="ltr"><br>
On Apr 17, 2015 10:50 AM, "Jan Lebert" <<a href="mailto:jan.lebert@online.de">jan.lebert@online.de</a>> wrote:<br>
><br>
> On 04/17/2015 07:42 PM, Ricordisamoa wrote:<br>
>><br>
>><br>
>> It works by putting<br>
>><br>
>> "scripts": {<br>
>> "start": "~/.nvm/versions/node/v0.12.2/bin/node server.js"<br>
>> }<br>
>><br>
>> in ~/www/js/package.json. It looks a bit hackish though...<br>
>> and nvm does not work in "start".<br>
>><br>
><br>
> You can also use the portgrabber command [1] if you want to use a nonstandard webserver(version). You'll need two scripts:<br>
><br>
> httpserver.sh<br>
> ====<br>
> #!/bin/bash<br>
> exec portgrabber jshint wrapper.sh<br>
> ====<br>
><br>
> wrapper.sh<br>
> =====<br>
> #!/bin/bash<br>
> export TOOL_WEB_PORT=$1<br>
> source ~/.nvm/nvm.sh<br>
> nvm exec 0.12.2 node ~/www/js/server.js<br>
> =====<br>
><br>
> and start it with<br>
><br>
> jstart -q webgrid-generic -l release=trusty -mem 4G httpserver.sh<br>
><br>
> Best wishes,<br>
> sitic<br>
><br>
> [1] <a href="https://wikitech.wikimedia.org/wiki/Help:Tool_Labs/Web#Other_web_servers">https://wikitech.wikimedia.org/wiki/Help:Tool_Labs/Web#Other_web_servers</a></p>
<p dir="ltr">Highly reccomend not using port grabber directly :) we should just find ways to make this simpler with the nodejs server directly. They seem to have found a workable way now, and I'll try to find a way to simplify and make it 'official'</p>