2013年3月18日 星期一

Install & start up nodejs on ubuntu


Download nodejs tar.gz from nodejs

$ unzip nodejs tar.gz
$ ./configure
$ sudo make install


That's it! You can do a little test to make sure that nodejs has been installed correctly

$ node -v


Now, we can add a simple server side source code named server.js like this

var http = require('http');

var server = http.createServer(function(req, res) {
  res.writeHead(200);
  res.end('Hello Http');
});
server.listen(8080); 
and start up this simple server by

node server.js

opening a browser and navigating to http://localhost:8080

Here is a good beginners guide

沒有留言:

張貼留言

FPGA/STM32 SPI 實驗

本實驗中,Nucleo H753ZI 當作 SPI Master,PYNQ-Z2 當作 SPI Slave。 使用SPI通訊協定傳送及接收8 Bytes。 腳位設定如下: Nucleo H753ZI 功能 PYNZ-Z2 PD14 CS W9 PA5 SCLK...