

Remember twich.me (node.js realtime chat)? Here is the source as promised. - isaacsu
http://github.com/isaacsu/twich

======
isaacsu
This is the source code for the app I've been working on. It was featured in
HN awhile back. <http://news.ycombinator.com/item?id=1590173>

This is the first time I'm open sourcing my code. Please be nice. Any feedback
is welcome.

And a twich for the occasion <http://twich.me/opensource>

~~~
DTrejo
Just wondering, but is there a reason you chose not to write this 100% in
node?

~~~
isaacsu
I wasn't very good at node, and I wanted to get it up and running quickly. So
I used node for the message passing and php for serving up the client files
and routing the rooms.

I'd put it to technical incompetence more than anything else.

------
poops
I made a site just like this <http://yamr.net> to be able to group chat with
friends/family/co-workers and not have them install anything (can go to
yamr.net/any-room-name)

It's pretty cool seeing your site and what you decided to do differently. I'll
be checking out your source later when I have time.

Mine is also built with php/node and I added socket.io so I could take
advantage of websockets. I auto-log in users and keep chat history (although
right now it only shows the latest 30 messages)

If you're looking to implement any features I have (like chat history) PM me
and I'll share how I did it

------
smilliken
Thanks for sharing the code on github, I've been pouring over it for a little
while now, and I'm inspired to try my own node project.

I see twitch is using php to render views, but I was wondering if anyone has
tried any js template engines? I've used jqote (based off of John Resig
templating engine, I believe) and it's pretty nice, but I'm curious if anyone
else has had experience with any other js templating engines.

~~~
tjarratt
I'm using tuxychandru's grasshopper which does templating (an a lot more -
it's a full fledged web server) in a relatively nice way.
<http://github.com/tuxychandru/grasshopper>

Another good approach, if you're looking for something that specifically plays
well with node, is to look at the modules page on the node.js wiki - it's
served me well.

<http://github.com/ry/node/wiki/Modules>

------
adamstac
Posted to The Changelog: [http://thechangelog.com/post/1422032099/twich-php-
node-js-re...](http://thechangelog.com/post/1422032099/twich-php-node-js-
realtime-web-based-chat)

------
isaacsu
I've created a forum for the twich project

<http://forum.twich.me/>

------
QNX
Is there a Twich without node.js for a hosted account drop-in?

------
bootload
did you run the code using a proxy http server? What is the server setup?

~~~
isaacsu
No proxy. Just apache running on 80 and node running on 443

~~~
bootload
I only ask because watching the presentation that Ryan Dahl presented in 2009
~ <http://jsconf.eu/2009/video_nodejs_by_ryan_dahl.html> mentions node.js
isn't secure enough to use as a webserver for production use yet :)

