<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Il 21/04/2015 15:50, Ricordisamoa ha scritto:<br>
    <blockquote cite="mid:55365592.8080909@openmailbox.org" type="cite">
      <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
      Il 17/04/2015 19:53, Yuvi Panda ha scritto:<br>
      <blockquote
cite="mid:CAFw=ySijUvvDBfLWNXL83nX6Kq-uzAS+=G6=OqkPhBrauwCcAw@mail.gmail.com"
        type="cite">
        <p dir="ltr"><br>
          On Apr 17, 2015 10:50 AM, "Jan Lebert" <<a
            moz-do-not-send="true" 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 moz-do-not-send="true"
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>
      </blockquote>
      <br>
      Task? :)
    </blockquote>
    <br>
    Any updates? Io.js v2.3.4 is running fine but still requires typing
    "~/.nvm/versions" etc. in package.json.<br>
    What about extracting the most appropriate version from the <a
      href="https://docs.npmjs.com/files/package.json#engines">engines</a>
    field?<br>
  </body>
</html>