Build a Node. js development environment under Ubuntu14.04

Source: Internet
Author: User
Tags install node
Recently, I want to find a lightweight service development platform that supports rapid development. I chose Node. js, there were several options at that time: Python + Django (using Django, although the development is fast, but the performance is not very good ). Ruby + ROR ). Node. js. Now that you have selected Node. js, you need to build a development environment. The following uses Ubuntu14.04 for development.

Recently, I was looking for a lightweight service development platform that supports rapid development. I chose Node. js. At that time, I had several options:

  1. Python + Django ).
  2. Ruby + ROR ).
  3. Node. js.

Now that we have selected Node. js, we need to build a development environment. Below we will build a Node. js development environment with Ubuntu 14.04 as the Development Platform:

  • Install Node. js:

Ubuntu 14.04 comes with the Node. js version too old, and I tried to install it is not successful, so you need to add Node. js PPA to install the latest version of Node. js, execute in the terminal:

sudo add-apt-repository ppa:chris-lea/node.jssudo apt-get updatesudo apt-get install nodejs

After the installation is complete, run the node-v command to check whether Node. js is successfully installed.

  • Install IDE:

WebStorm is recommended for Node. js IDE, and Java is required for running WebStorm. If Java is not installed on your computer, install it first. If not, Google it.

Go to http://www.jetbrains.com/webstorm/to download the latest webstormfile. After the download is complete, decompress it to a specified directory (the directory is random, as long as you have access permission). After decompression, run bin/webstorm. sh to start WebStorm.

  • Create a Node. js project:

Go to the WebStorm development environment and create a Node. js project:

The project type must be Node. js Express App (Express is a Web Framework ).

Configure the version and template of Express. Keep the default value!

The source code of Node. js will be downloaded when you create a project (which is automatically prompted). After the download is complete, the Node. js project will be created.

  • Run Hello World:

Enter the Node. js Hello World code:

console.log("Hello World!");

Sub-branch commands in the terminal:

storezhang@Storezhang-Desktop:~$ node test.js Hello World!

Success!

Installation and configuration http://www.linuxidc.com/Linux/2014-05/101418.htm of Node. js development environment under javasru 12.04

Node. Js getting started [PDF + related Code] http://www.linuxidc.com/Linux/2013-06/85462.htm

Node. js Development Guide hd pdf Chinese version + Source http://www.linuxidc.com/Linux/2014-09/106494.htm

Node. js getting started development guide Chinese edition http://www.linuxidc.com/Linux/2012-11/73363.htm

Node. js installation and configuration http://www.linuxidc.com/Linux/2013-05/84836.htm

Ubuntu build and install Node. js http://www.linuxidc.com/Linux/2013-10/91321.htm

Node. js details: Click here
Node. js: Click here

For more information about Ubuntu, see Ubuntu special page http://www.linuxidc.com/topicnews.aspx? Tid = 2

This article permanently updates the link address: Http://www.linuxidc.com/Linux/2014-12/110983.htm

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.