Installation and testing of nodejs environment on mac
Jul 28, 2016 am 08:27 AMA summary
Everyone who has worked as a web server before knows that both nginx+lua and the popular node.js can be used as web servers. The former is more troublesome than the latter in terms of program writing and configuration, but They are all similar in use. Here I suggest that if you don’t know the Lua scripting language, you can learn more about this scripting language. It is known as the scripting language with the highest execution efficiency among all scripting languages. The bottom layer is based on C language, which is very Easy to use, cross-platform!
Next, I will configure the node.js environment for you.
Second configuration of mac node.js environment
Step 1: Open the terminal and enter the following command to install Homebrew
ruby -e “$(curl -fsSL
https://raw.githubusercontent.com/Homebrew/install/master/install);
Step 2: Install node, enter the following command in the terminal
brew install node
Step 3 to view node installation Success or not
node -v
The above three steps node is successfully installed
Three program test
Step 1: Create a new file test.js
Step 2: Use the terminal to find it Run in the directory where it is located
Step 3: Access through the browser and return data in json format
Step 4: The front end can parse the data by calling this interface, and can The current page displays data.
End of three
Isn’t it very simple? If you have done web service interface development before, this should be familiar, and it is even very simple.
').addClass('pre -numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i ').text(i)); }; $numbering.fadeIn(1700); }); });The above introduces the installation and testing of the nodejs environment on mac, including the relevant aspects. I hope it will be helpful to friends who are interested in PHP tutorials.

Hot Article

Hot tools Tags

Hot Article

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Real-time protection against face-blocking barrages on the web (based on machine learning)

How to configure nginx to ensure that the frps server and web share port 80

Pi Node Teaching: What is a Pi Node? How to install and set up Pi Node?

Using Jetty7 for Web server processing in Java API development

How to implement form validation for web applications using Golang

Token-based authentication with Angular and Node

How to enable administrative access from the cockpit web UI
