Package:Nodejs

From Funtoo
Jump to navigation Jump to search

Nodejs

   Tip

We welcome improvements to this page. To edit this page, Create a Funtoo account. Then log in and then click here to edit this page. See our editing guidelines to becoming a wiki-editing pro.

Node.js is an event driven, non-blocking javascript library that can act as a webserver.

Installation

root # emerge net-libs/nodejs

Runtime

Node.js installs a package manager called npm. there are over 120,000 javascript libraries for node to work with. Search through the external resource links on this page to find something you like to install.

For our example we will fetch a website benchmark tool.

root # npm install -g sitespeed.io

We'll set it loose on funtoo, 10 pages will be analyzed.

root # cd / && sitespeed.io -m 10 -u http://www.funtoo.org

To see the result of benchmarking, point a browser @ (note that your date, and time will probably differ, however the script will tell which directory to look at.) /sitespeed-result/www.funtoo.org/2015-04-18-00-57-23/index.html

As of 05:07, April 18, 2015 (UTC) the suggested method to serve node.js is through tengine + passenger. see www-servers/tengine

External Resources