Click here to Skip to main content
15,891,684 members

stevic - Professional Profile



Summary

Follow on Twitter LinkedIn      Blog RSS
40
Author
70
Authority
31
Debator
4
Editor
1
Enquirer
9
Organiser
331
Participant
Freelance Web developer, Artificial Intelligence and Science enthusiast

 

Reputation

Weekly Data. Recent events may not appear immediately. For information on Reputation please see the FAQ.

Privileges

Members need to achieve at least one of the given member levels in the given reputation categories in order to perform a given action. For example, to store personal files in your account area you will need to achieve Platinum level in either the Author or Authority category. The "If Owner" column means that owners of an item automatically have the privilege. The member types column lists member types who gain the privilege regardless of their reputation level.

ActionAuthorAuthorityDebatorEditorEnquirerOrganiserParticipantIf OwnerMember Types
Have no restrictions on voting frequencysilversilversilversilver
Bypass spam checks when posting contentsilversilversilversilversilversilvergoldSubEditor, Mentor, Protector, Editor
Store personal files in your account areaplatinumplatinumSubEditor, Editor
Have live hyperlinks in your profilebronzebronzebronzebronzebronzebronzesilverSubEditor, Protector, Editor
Have the ability to include a biography in your profilebronzebronzebronzebronzebronzebronzesilverSubEditor, Protector, Editor
Edit a Question in Q&AsilversilversilversilverYesSubEditor, Protector, Editor
Edit an Answer in Q&AsilversilversilversilverYesSubEditor, Protector, Editor
Delete a Question in Q&AYesSubEditor, Protector, Editor
Delete an Answer in Q&AYesSubEditor, Protector, Editor
Report an ArticlesilversilversilversilverSubEditor, Mentor, Protector, Editor
Approve/Disapprove a pending ArticlegoldgoldgoldgoldSubEditor, Mentor, Protector, Editor
Edit other members' articlesSubEditor, Protector, Editor
Create an article without requiring moderationplatinumSubEditor, Mentor, Protector, Editor
Approve/Disapprove a pending QuestionProtector
Approve/Disapprove a pending AnswerProtector
Report a forum messagesilversilverbronzeProtector, Editor
Approve/Disapprove a pending Forum MessageProtector
Have the ability to send direct emails to members in the forumsProtector
Create a new tagsilversilversilversilver
Modify a tagsilversilversilversilver

Actions with a green tick can be performed by this member.


 
GeneralExample of 'Advance Where' in Laravel Pin
stevic6-Nov-14 16:45
professionalstevic6-Nov-14 16:45 
GeneralInstall Node.js, NPM and Express in Ubuntu 12.04 Pin
stevic9-Apr-14 7:21
professionalstevic9-Apr-14 7:21 
Node.js is a platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices. - http://nodejs.org/

If you dont want to install it via Terminal , you check itu here http://nodejs.org/download/

Install Node.js

you can Install it using Chris Lea launchpad repo, and type these commands one by one :
Python
sudo apt-get install python-software-properties
sudo apt-add-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs


Test your nodes to make sure that its installed successfully by just typing 'node' :
Python
node 
> 3 + 3
6


or create a file somewhere in your directory (for ex : app.js )

and type this :

JavaScript
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');
console.log('Server running at http://127.0.0.1:1337/');


save the file, then execute it via terminal like this:

Python
node app.js 



After that you can check your installed node Version with this command :
Python
node -v


To make your life easier with Nodejs, you can install NPM ( Nodejs Package Modules ). its a module manager built for Nodejs.

Install NPM

type this command in your terminal

Python
sudo apt-get install npm


once installed, you can now easyly manage modules or packages you wish to include tou your Nodejs Project

Install Express

Express is a Nodejs Framework. And again this cool stuff could make your node-life is easier.

type this to install it
Python
npm install express

to make an easy Application or project with express you can install it again (doesnt matter) with this :
npm install -g express
and now , to create your nodes App you can just type
Python
express myapp

Express will generate your default ( you modify it your way later) modules for you like this
Python
create : myapp
   create : myapp/package.json
   create : myapp/app.js
   create : myapp/public
   create : myapp/public/javascripts
   create : myapp/public/images
   create : myapp/public/stylesheets
   create : myapp/public/stylesheets/style.css
   create : myapp/routes
   create : myapp/routes/index.js
   create : myapp/routes/user.js
   create : myapp/views
   create : myapp/views/layout.jade
   create : myapp/views/index.jade

Run you apps with
cd myapp

node app.js



And your Nodes is ready !!!.

I have written an example of modular nodejs app here
Making A Modular Web Applications With Nodejs And Express

Source
Freelance makes perfect | Sains & Teknologi


modified 6-Nov-14 22:35pm.

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.