nodejs

Chrome Lighthouse Audit Tool

 

Download nodejs

to test deployment, run version command

nodejs$ ./node -v

$ v10.16.0

Install Chrome

Install lighthouse

npm install -g lighthouse

Lighthouse CLI

lighthouse <url>

lighthouse https://google.com

 

Testing NodeJS/Creating a NodeJS Server

/**
 * SanityTest for NodeJS v10
 */

var http = require('http');
http.createServer(
    function handler(req,res){
        res.writeHead(200,{'Content-Type': 'text/plain'});
        res.end('Hello World\n');
    }).listen(1337, '127.0.0.1');
    
console.log('Server running at http://127.0.0.1:1337/');

 

 

 

 

NodeJS: Server Instantiation

var http = require("http");

var server = http.createServer(function(request, response) {
    response.writeHead(200, {"Content-Type": "text/html"});
    
    response.end('Hello You');
}).listen(8888);

 

Tags

Eclipse: Mars: Startup Script for Setting Java, NodeJS and Starting Eclipse

@echo off
set DEV_HOME=C:\d\dev
set JAVA_HOME=%DEV_HOME%\java\jdk1.8.0_71
set PATH=%PATH%;%JAVA_HOME%\bin;C:\d\DEV\tools\nodejs

set command_java=%JAVA_HOME%\bin\javaw.exe
set command_eclipse=%DEV_HOME%\tools\eclipse-mars\eclipse.exe

start %command_eclipse% -vm %command_java% -showlocation -vmargs -server -Xms512m -Xmx1024m -XX:MaxPermSize=128m

cd %DEV_HOME%

call cmd

NodeJS Installation for A2Hosting

This article describes how to install the Node.js platform on managed hosting accounts (please see the Article Details sidebar to the right for a complete list of supported products). You can use Node.js to host third-party applications like the popular Ghost blogging platform, or you can run your own applications.
Tags
Subscribe to nodejs