I want to use javascript on my
ongoing moodle development work. But the latest version of moodle 2.8
supporting to YUI library. Now there is no use of YUI because yahoo ceased that
api due to transitioning (http://yahooeng.tumblr.com/post/96098168666/important-announcement-regarding-yui)
The soultion is that moodlers suggesting to install nodejs to use javascripts modules. So I mentioned steps which i installed on my windows 7 machine.
1. Download the latest nodejs
executable file from https://nodejs.org/#download
2. Once the installation done the
files will be placed under the C://Program Files/nodesjs directory
3. Click on command prompt and test the nodejs verion to check the nodejs installed correctly.
5.
To check the nodejs by script
Just write hello.js with the content
console.log('Welcome to NodeJs!');
Then from command prompt right the
below command to execute it
6. Create a test file server.js and put this code in that file:
var
http = require('http');
http.createServer(function
(req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello World\n');
}).listen(1337,
"127.0.0.1");
0 comments:
Post a Comment