Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/feed-rss2.php on line 8
Installing Node.js and Express on Ubuntu – AKLWEB HOST LLC Support Center https://support.aklwebhost.com Fri, 06 Dec 2019 23:44:01 +0000 en-US hourly 1 https://wordpress.org/?v=6.4.4 Installing Node.js and Express on Ubuntu https://support.aklwebhost.com/knowledgebase/installing-node-js-and-express-on-ubuntu/ https://support.aklwebhost.com/knowledgebase/installing-node-js-and-express-on-ubuntu/#respond Fri, 06 Dec 2019 00:38:49 +0000 https://support.aklwebhost.com/?post_type=manual_kb&p=2501 Powered by the Chrome V8 EngineNode.js is a popular language used to build fast scalable applications. It has already powered numerous projects including Express. This tutorial will show you how to install Node.js and Express.js on Ubuntu 14.04.

Step 1: Download Node.js

You would want to download the latest stable version of Node.js. On your server, run the following command to download and extract Node.js:

cd /tmp
wget http://nodejs.org/dist/v0.10.32/node-v0.10.32-linux-x64.tar.gz
tar xvf node-v0.10.32-linux-x64.tar.gz

Step 2: Install Node.js

Run the following commands. These will install node js by copying everything in node-v0.10.32-linux-x64 into /usr/local:

cd node-v0.10.32-linux-x64/
cp * /usr/local/ -r
cd ~

Now run node -v. If you see v0.10.32, then you then have successfully installed Node.js.

Step 3: Install Express.js

Now for the Express tutorial. To get started, you will need to run the following command to install Express generator. Express generator helps to easily create your project.

npm install -g express-generator

Once that is done, test to make sure Express generator is installed by running express -h. Upon success, it will show you a list of available options.

Step 4: Create a Project

Even though there are several options that you can choose from, we will stick with the default when creating our project. To create a project, run the following commands on your server:

express expressproject
cd expressproject
npm install

This first creates a new folder called expressproject. Inside it, you will see 2 files called app.js and package.json, and 5 directories called binnode_modulespublicroutes, and views. This will also install Express for your project. You can now run npm start to start your Express server. If everything is setup correctly, you will see the following:

> expressproject@0.0.0 start /root/expressproject
> node ./bin/www

In your web browser, navigate to the IP address of your VPS at port 3000. The URL is as follows (replace 0.0.0.0 accordingly):

http://0.0.0.0:3000

Upon success, you will see Welcome to Express on the page in your browser.

You have successfully setup Node.js with Express!

]]>
https://support.aklwebhost.com/knowledgebase/installing-node-js-and-express-on-ubuntu/feed/ 0