Tag Archives | Node.js

How to run a https website with Nodejs, express and socket.io

Step 1: generate RSA key Use command line: (on Windows we can use Cygwin) Result: Step 2: create file csr.pem Result: Step 3: create SSL certificate file Result: Note: this is in practice, in production you must buy one certificate or use free SSL Step 4: continue with Nodejs app here an example app: app.js […]

Read full story Comments { 1 }

How to install and use ForeverJS on CentOS

We can install ForeverJS on CentOS with npm command: Result: To learn how to use ForeverJS, you can read at this tutorial: Managing Nodejs servers with foreverjs

Read full story Comments { 1 }

How to install NodeJS on Centos

In this tutorial, we use Centos 6.8 64bits. Step 1: 1.a: If you Install NodeJS v4: Result: 1.b: If you Install NodeJS v6: Result: 1.c: If you Install NodeJS 0.10: Step 2: Result: Step 3 (optinal): install build tools Now you can check your nodejs version

Read full story Comments { 0 }

Nodejs error: Cannot find module ‘npmlog’

I have a problem with Nodejs when i upgrade to v4.2.3 for Windows 7 64bits How to fix it. Follow to these steps Step 1: Delete the folder: C:\Users\Administrator\AppData\Roaming\npm\node_modules\npm Step 2: Goto the folder: C:\Users\Administrator\AppData\Roaming\npm If you see npm and npm.cmd, delete them Done, now you can use npm

Read full story Comments { 0 }

Running node.js with apache

We generally use port 80 for http server, and use other port for the Node.js application, ex: localhost:443 for the chat application. How don’t use the port that could enter the nodejs application. We can use the modules mod_proxy and mod_proxy_http of apache. Step 1: configuration the file httpd.conf (ex: D:\AppServ\Apache2.2\conf\httpd.conf) Step 2: configuration the […]

Read full story Comments { 0 }

Managing Nodejs servers with foreverjs

Foreverjs is not only a simple CLI tool for ensuring that a given script runs continuously, but also has advanced features support running multiple nodejs applications. By using the -w flag, it gives you the option of restarting the server on file changes and we don’t only automatically restart the application when the code changes, […]

Read full story Comments { 1 }

How to Install socket.io on Node.js on Windows 7

Windows 7 32bit Step 1: install Node.js Download the Windows Installer: Eg:http://nodejs.org/dist/v0.10.5/node-v0.10.5-x86.msi You can find more available version of node js here: https://nodejs.org/en/download/releases/ You install Node.js … Step 2: run CMD as Administrator change dir to your application folder (ex: D:\AppServ\www\chat) Step 3: install Socket.io Use command: npm install socket.io@0.8.4 Result: D:\AppServ\www\chat>npm install socket.io@0.8.4 npm […]

Read full story Comments { 0 }