1. 程式人生 > >mac os install node.js

mac os install node.js

原文地址:http://howtonode.org/how-to-install-nodejs

 如果你使用 homebrew 包管理工具的話,可以直接brew install node

或者用另外一種安裝方式:

  
git clone git://github.com/ry/node.git
cd node
./configure
make
sudo make install

測試時候成功:

寫一個Hello Node.js!

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

輸入以下命令:
> node hello_node.js
Server running at http://127.0.0.1:8124/


附:git 安裝url:http://help.github.com/mac-set-up-git/

相關推薦

mac os install node.js

原文地址:http://howtonode.org/how-to-install-nodejs  如果你使用 homebrew 包管理工具的話,可以直接brew install node 或者用另外一種安裝方式:   git clone git://githu

how to install node.js and npm on Ubuntu

To install Node.js, type the following command in your terminal: sudo apt-get install nodejs Then install the Node package manager, npm: sud

Mac平臺開發Node.js小記

一、下載安裝Node.js 地址:https://nodejs.org 二、建立Web工程(含網站開發) 1、Express(須先npm install -g express-generator) express ProName 預設模板引擎是jade。 修改模板引擎用如

Mac環境下Node.js版本升級

 第一步,先檢視本機node.js版本:          $ node -v     第二步,清除node.js的cache:       

ROS2 MAC OS Install

ROS2 MAC OS Install(非原創),安裝過程記錄一下 注意: (1)如果安裝了anaconda,請將~/.bash_profile檔案中的export PATH="/anaconda3/bin:$PATH"遮蔽,否則預設使用anaconda中的python,導致接下來安裝catki

如何在Mac上安裝Node.js和NPM

原作者:Dave McFarland  翻譯轉載:https://blog.teamtreehouse.com/install-node-js-npm-mac   如何在Mac上安裝Node.js和NPM   JavaScript是世界上最流行

第四十六篇:MAC下使用 Node.js 實現一個 WebServer 伺服器

引序: Node.js 採用一系列“非阻塞”庫來支援事件迴圈的方式。Node.js是一個伺服器端 JavaScript 直譯器 , 也就是說 Node.js 是一個支援 JavaScript 語法編寫伺服器程式碼的環境。 在MAC下用命令安裝 N

mac 下更新node.js的版本

之前用brew直接升級出現了一些問題 1) Clear NPM's cache: sudo npm cache clean -f sudo npm install -g n 3) Install latest stable NodeJS version sudo n

npm安裝時出現錯誤解決辦法及mac下升級node.js

npm error  cwd.process 關閉所有terminal終端,執行下面的命令: $ sudo npm cache clean -f $ sudo npm install -g n n是用來管理node.js版本的。 mac 升級 node.js 的簡易方法。

Node.js 多版本安裝配置(Window、Ubuntu 、CentOS 、Mac OS、Cloud Studio)

向大家介紹在window和Linux上安裝Node.js的方法。 本安裝教程以Node.js v4.4.3 LTS(長期支援版本)版本為例。 Node.js安裝包及原始碼下載地址為:https://nodejs.org/en/download/。 你可以根據不同平臺系統選擇你需要的

How to Install wget in OS X如何在Mac OS X下安裝wget並解決configure: error:

configure openssl usr local 解壓 fix 官網下載 .org get 1.ftp://ftp.gnu.org/gnu/wget/官網下載最新的安裝包 wget-1.19.tar.gz 2.打開終端輸入 tar zxvf wget-1.9.1.ta

node.js npm install 模塊 無反應

efi 下標 加載 進行 mrc bsp 完全 安裝路徑 npm命令 最近在弄折騰nodejs,之後把node刪除後再進行npm命令的時候無反應 看到nodejs的默認模塊安裝路徑在c盤 於是想修改下,按命令 npm config set prefix 。 結果就遇坑了,之

Install Local SQL In Mac OS

ext 設置 root密碼 end itblog 改密碼 操作數 com 出現 extends:http://www.cnblogs.com/maxinliang/p/3583702.html 一、安裝 到MySQL官網上http://dev.mysql.com/dow

node.js獲取ip及mac

node.js res ces FN elf mil func require net ; (function (win) { var os = require(‘os‘); var ifaces = os.networkInterfa

node.js環境在Window和Mac中配置,已經安裝cnpm和配置Less環境

use usr 版本 htm args gin targe mpi ffffff Node.js 和cnpm安裝 最近準備學習vue.js,但首先需要配置電腦的環境。配置node.js。 1.在node(https://nodejs.org/en/)官網上下載安裝node.

轉 原生js canvas實現蘋果電腦mac OS視窗最小化效果

http://www.17sucai.com/pins/demo-show?id=2459 http://www.17sucai.com/pins/demo-show?id=2458     很多資料 ,前端程式碼,網站程式碼 要錢的也不貴,買點來玩玩

npm install時,報錯 install: `node install.js`安裝失敗

說明 最近開始重新看前端框架,選擇的是vueヽ(ー_ー)ノ,正常安裝Node、vue、vue-cli,利用腳手架初始化專案,npm install時,報錯 install: `node install.js`安裝失敗,看到 2750 error [email protected

Mac下解除安裝nmp node.js

1. 解除安裝node npm       (1) 先解除安裝 npm: sudo npm uninstall npm -g   (2) 然後解除安裝 Node.js.   (2.1) 如果是 Ubuntu 系統並使用 apt-get 安裝的,可以使用命令

Node.js 獲取本機Mac地址

  首先我們要先載入一個包用於獲取mac地址 npm install getmac   載入完畢會在node_modules資料夾下發現一個getmac資料夾,我們把對應的路徑載入到程式中 原始碼如下: var npm = require('../node_modules

程式設計工具(七)Mac下的Java環境和Node.js/Ruby開發環境搭建(基於Intellj Idea)

參考: 一、Mac下的Java環境配置 1. 安裝Jdk 下載Mac版本的JDK,下好之後安裝,此時在bash中使用java -version命令已經看到Version號。 Mac支援多版本Java虛擬機器的選擇,選擇如下: 開啟Java控制檯之後可以在Desktop