Today's Posts Follow Us On Twitter! TFL Members on Twitter  
Forum search: Advanced Search  
Navigation
Marketplace
  Members Login:
Lost password?
  Forum Statistics:
Forum Members: 24,256
Total Threads: 106,575
Total Posts: 592,698
There are 87 users currently browsing (tf).
 
  Our Partners:
 
  TalkFreelance     Design and Development     Programming     Javascript :

Anyone code Node.js?

Thread title: Anyone code Node.js?
Reply    
    Thread tools Search this thread Display Modes  
04-30-2011, 09:31 PM
#1
Gaz is offline Gaz
Gaz's Avatar
Status: Request a custom title
Join date: Apr 2007
Location: UK
Expertise: Code & Programming
Software: Coda, TextMate, Sublime 2
 
Posts: 2,096
iTrader: 26 / 100%
 

Gaz will become famous soon enough Gaz will become famous soon enough

Send a message via Skype™ to Gaz

  Old  Anyone code Node.js?

Hey

So I just watched nettut's introduction to node js (http://net.tutsplus.com/tutorials/ja...learn-node-js/).

It seems great! Does anyone else use it? Do you have any good resources for learning it?

04-30-2011, 09:53 PM
#2
Immersion is offline Immersion
Status: Senior Member
Join date: Dec 2005
Location:
Expertise:
Software:
 
Posts: 918
iTrader: 5 / 100%
 

Immersion is on a distinguished road

  Old

Not yet but I really would like to get a chance to use it. Maybe I can do something in my new job using Real time.

Reply With Quote
05-01-2011, 09:30 PM
#3
Immersion is offline Immersion
Status: Senior Member
Join date: Dec 2005
Location:
Expertise:
Software:
 
Posts: 918
iTrader: 5 / 100%
 

Immersion is on a distinguished road

  Old

So yeah, i spent part of the day playing around with node.js and i must say it really is quite neat. Only dabbled in the basics and thought it would be a good opportunity to try out mongodb. Just toyed with socket.io for the client side, and then using socket.io with mongoose to connect to a database. All it does at the moment is take messages from the user and stores it into a database. I might make the app that everyone makes, a chat app, but use mongodb for a chat history.

NodeJS Installation
https://github.com/joyent/node/wiki/Installation

I personally use a package manager to install, homebrew on my mac. But here are the other options found here https://github.com/joyent/node/wiki/...ackage-manager

Then make sure you do step 4 on the installation and install npm it will make life a lot easier when installing modules. They alll provide instructions on how to install using it.

If it is a web project then i recommend using http://socket.io/ for the server and client. It will allow the use of web sockets in modern browsers and fallback for older browsers. The site gives some code examples which should get you started but I did get confused along the way on the client side.

http://jeffkreeftmeijer.com/2010/exp...-with-node-js/
This tutorial gave me some insight into what i should be doing and roughly how to do it. Also an interesting read nonetheless on node js. My client side code can be found here: http://pastie.org/1854764 Make sure you have a copy of socket-io client, you will also need to run this page on a localhost as the url must start with http://. My server can be found here: http://pastie.org/1854769 It also features the use of mongo db.

I decided to use mongoose as from what i saw it seemed to be the nicer looking library, but there are also many others out there.
https://github.com/LearnBoost/mongoose
It also has all the documentation you will need to get started.

Thanked by 2 users:
Artashes (05-04-2011), Gaz (05-04-2011)
05-04-2011, 01:24 AM
#4
Gaz is offline Gaz
Gaz's Avatar
Status: Request a custom title
Join date: Apr 2007
Location: UK
Expertise: Code & Programming
Software: Coda, TextMate, Sublime 2
 
Posts: 2,096
iTrader: 26 / 100%
 

Gaz will become famous soon enough Gaz will become famous soon enough

Send a message via Skype™ to Gaz

  Old

Fantastic Gary. I'll look into those links ASAP

Reply With Quote
Reply    


Thread Tools
Display Modes

  Posting Rules  
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump:
 
  Contains New Posts Forum Contains New Posts   Contains No New Posts Forum Contains No New Posts   A Closed Forum Forum is Closed