]> Dogcows Code - chaz/chatty/blob - README
fix some inaccuracies in the documentation
[chaz/chatty] / README
1 NAME
2 Chatty -- Real-time (comet) chat application written with Perl/Catalyst
3
4 SYNOPSIS
5 cpan Catalyst::Devel # install Catalyst
6
7 perl Makefile.PL
8 make installdeps # install other dependencies
9
10 cp extra/nginx.conf /etc/nginx/nginx.conf
11 /etc/rc.d/nginx start # run nginx http server
12
13 cp extra/cometd/meteord.conf.dist /etc/meteord.conf
14 # also add the 'SubscriberDocumentRoot' option to meteord.conf;
15 # it should be set to $REPOSITORY_ROOT/extra/cometd/public_html
16
17 cd extra/cometd; ./meteord -d # run meteord in a new shell
18
19 cat extra/hosts >>/etc/hosts # configure hostnames
20 sqlite3 db/info.db <db/schema.sql # create the user database
21
22 ./script/chatty_server.pl -f # run the app
23 firefox http://chatty.com/ # finally, see if it works
24
25 DESCRIPTION
26 This is a toy web application implementing real-time (comet) chat. I
27 wrote this as an exercise to see how easy it would be to write such an
28 application using Perl/Catalyst. It was fairly easy.
29
30 Catalyst itself provides no streaming support or message bus, so I am
31 using a dedicated comet server to handle all of that, meteord. However,
32 in order to get meteord to work, it needs to be serving on the same port
33 as the Catalyst app. I accomplished this by using nginx as a reverse
34 proxy. However, you can't just use localhost because meteord does some
35 checks on the hostname to make sure it will not run into any
36 cross-domain restrictions, and those checks barf if the hostname doesn't
37 have a TLD. The fix for this is to just assign some fake hostnames to
38 localhost; the provided nginx configuration uses chatty.com for the
39 Catalyst app and data.chatty.com for the comet server, both on port
40 number 80. The actual Catalyst app runs on port 3000 and meteord runs on
41 port 4670. That's the reason for the complicated setup.
42
43 The perl dependencies can all be installed locally in a subdirectory of
44 the user's home directory using local::lib, like this:
45
46 # install local::lib (see L<http://search.cpan.org/dist/local-lib/>)
47 # then,
48 eval $(perl -I$HOME/perl5/lib/perl5 -Mlocal::lib)
49
50 It is also usually much nicer to work with cpanminus rather than plain
51 old cpan:
52
53 # install cpanminus
54 curl -L http://cpanmin.us | perl - --self-upgrade
55
56 BUGS
57 Tests are sadly nonexistent. :-(
58
59 AUTHOR
60 Charles McGarvey <chazmcgarvey at brokenzipper.com>
61
62 LICENSE
63 This library is free software. You can redistribute it and/or modify it
64 under the same terms as Perl itself.
65
This page took 0.033818 seconds and 4 git commands to generate.