Skip to main content

Install node.js in ubuntu




ထမဆံုး http://nodejs.org/ မွာ သြင္းမယ့္ ဖိုင္ကုိအရင္ေဒါင္းလိုက္ပါ။
ျပီးရင္ dependencie လိုအပ္တာေတြကုိ ေအာက္က  ကြန္မန္းနဲ့ ႏွစ္ခုသြင္းပါ။


  1. sudo apt-get install g++ curl libssl-dev apache2-utils
  2. sudo apt-get install git-core



ျပီးရင္ေတာ့ ေအာက္က ကြန္မန္းနဲ့တဆင့္ျခင္းသြင္းရင္ ဆင္ေျပပါျပီ။

  1. cd node { download ဆြဲထားတဲ့ဖိုင္ကုိ ျဖည္ျပီးေတာ့ အဲဒီဖိုင္ထဲဝင္ }
  2. ./configure
  3. make
  4. sudo make install

ရမရစမ္းဖုိ့အတြက္က ေအာက္က tut ေလးစမ္းျပီးသိႏုိင္ပါတယ္။

ေအာက္က ကုတ္ေတြကုိ test.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/');

သိမ္းျပီးရင္ Terminal ထဲကေန node test.js ဆိုျပီးေခၚရင္  Server running at http://127.0.0.1:8124/ ဆိုျပီးေပၚေနပါလိမ့္မယ္။ ဒါဆိုရင္ browser ကေန http://127.0.0.1:8124/ ဆိုျပီးေခၚရင္ Hello Node.js ဆိုျပီးေပၚေနရင္ဆင္ေျပပါျပီ။
error ရွိရင္လဲ ဘယ္နားမွားလဲတန္းျပပါတယ္။


Thanks ( http://howtonode.org/how-to-install-nodejs ) 

+ logo ( http://cwbuecheler.com/web/tutorials/2013/node-express-mongo/nodelogo.png )

Comments

Popular posts from this blog

Lenovo VeriFace Software

ဒီေဆာ့၀ဲကေတာ့ ကြန္ပ်ဴတာ login ၀င္တဲ့အခါမွာ password ရိုက္စရာမလိုပဲ မ်က္နွာေလးျပလိုက္ရံုနဲ့ ေအာ္တို login ၀င္ေပးပါတယ္ .လန္းပါတယ္.webcam တခုေတာ့လိုပါလိမ့္မယ္ laptop ေတြ အတြက္ဆိုရင္ေတာ့ရွယ္ပါပဲ . တျခား brand ေတြမွာလဲအလုပ္လုပ္ပါတယ္ . ေလာေလာဆယ္ကၽြန္ေတာ္က Acer ၾကီးနဲ့ကလိေနတာ :D size : 30.39 MB Click here to download @ mediafire.com Click here to download @ ifile.it Photo credit @ www.tkshare.com Thank u,ko zaw ye` tun :)

Learning English Through Laughter : 3

Mr.Green went to Germany, because he had some work there.He came back last Monday, and his young wife met him at the airport. They walked to their car and passed a tall, pretty air-hostess. Mr. Green said to her , ' Goodbye, Miss Harris, ' and the air-hostess smiled and said, 'Good bye' too. Mrs. Green stopped and looked at the air-hostess .Then she said to her husband, 'How did you know her name?' 'That was easy,'answered Mr.Green. 'The names of the captain and all the screw were on a piece of paper in front of our seates.' 'What was the name of the captain?' Mrs. Green asked with a smile. Mr.Green launged and answered ,'I don't remember any of the other names.' 4/\/\@