[Labs-l] Node.js updates
Ricordisamoa
ricordisamoa at openmailbox.org
Tue Jul 28 14:23:34 UTC 2015
https://phabricator.wikimedia.org/T106961
Il 17/07/2015 19:24, Ricordisamoa ha scritto:
> Il 21/04/2015 15:50, Ricordisamoa ha scritto:
>> Il 17/04/2015 19:53, Yuvi Panda ha scritto:
>>>
>>>
>>> On Apr 17, 2015 10:50 AM, "Jan Lebert" <jan.lebert at online.de
>>> <mailto:jan.lebert at online.de>> wrote:
>>> >
>>> > On 04/17/2015 07:42 PM, Ricordisamoa wrote:
>>> >>
>>> >>
>>> >> It works by putting
>>> >>
>>> >> "scripts": {
>>> >> "start": "~/.nvm/versions/node/v0.12.2/bin/node server.js"
>>> >> }
>>> >>
>>> >> in ~/www/js/package.json. It looks a bit hackish though...
>>> >> and nvm does not work in "start".
>>> >>
>>> >
>>> > You can also use the portgrabber command [1] if you want to use a
>>> nonstandard webserver(version). You'll need two scripts:
>>> >
>>> > httpserver.sh
>>> > ====
>>> > #!/bin/bash
>>> > exec portgrabber jshint wrapper.sh
>>> > ====
>>> >
>>> > wrapper.sh
>>> > =====
>>> > #!/bin/bash
>>> > export TOOL_WEB_PORT=$1
>>> > source ~/.nvm/nvm.sh
>>> > nvm exec 0.12.2 node ~/www/js/server.js
>>> > =====
>>> >
>>> > and start it with
>>> >
>>> > jstart -q webgrid-generic -l release=trusty -mem 4G httpserver.sh
>>> >
>>> > Best wishes,
>>> > sitic
>>> >
>>> > [1]
>>> https://wikitech.wikimedia.org/wiki/Help:Tool_Labs/Web#Other_web_servers
>>>
>>> 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'
>>>
>>
>> Task? :)
>
> Any updates? Io.js v2.3.4 is running fine but still requires typing
> "~/.nvm/versions" etc. in package.json.
> What about extracting the most appropriate version from the engines
> <https://docs.npmjs.com/files/package.json#engines> field?
>
>
> _______________________________________________
> Labs-l mailing list
> Labs-l at lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/labs-l
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.wikimedia.org/pipermail/labs-l/attachments/20150728/12e448f6/attachment.html>
More information about the Labs-l
mailing list