Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/airhorns/codejam
a node.js application written for the mcgill codejam in 48 hours
https://github.com/airhorns/codejam
Last synced: 25 days ago
JSON representation
a node.js application written for the mcgill codejam in 48 hours
- Host: GitHub
- URL: https://github.com/airhorns/codejam
- Owner: airhorns
- Created: 2010-11-19T23:54:24.000Z (almost 14 years ago)
- Default Branch: master
- Last Pushed: 2010-11-25T00:38:31.000Z (almost 14 years ago)
- Last Synced: 2024-06-11T17:22:00.045Z (5 months ago)
- Language: C
- Homepage: mcgillcodejam.com
- Size: 918 KB
- Stars: 3
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
Awesome Lists containing this project
README
===== CODE JAM =====
Hello Judges!
Our application is a web based application which interacts with some servers in the backend. Start it with start.sh, stop it with stop.sh.You must run these as root.
To run our application so you can evaluate it, you need to A) configure it, B) start the database server, C) start the server,
D) start the client, and E) view the website in a webbrowser.Hopefully we will be able to set everything up so you can do the first four things easily by running the start.sh script in
the project directory.==== Running the application ====
The application consists of 3 components.
- Redis database server
- C++ backend and protocol implementation
- Node.js web server + frontentTo run the Redis backend database, you must run
$ sudo redis-server /usr/local/etc/redis.confTo run the backend, change to the project directory and run
$ ./C_server/serverTest -p 8211To run the frontend, change to the project directory and run
$ node public/server.js==== The other backend ====
We wrote two backends. One is hacky and fast and written in C++, please use it to evaluate us.
For style points and for fun, we also wrote a full fledged implementation of the backend in
node.js. It puts bids in the database in the exact same manner as the C++ one, so you can view it's
interactions using the same node.js frontend.
To run the reference Node.js backend (which is kinda slow in the face of C++ one), run
$ node server/ipo_server.js==== Installation ====
Install node.
$ wget http://nodejs.org/dist/node-v0.2.5.tar.gz
$ tar xvpf node-v0.2.5.tar.gz && cd node-v0.2.5
$ ./configure
$ make
$ make installInstall npm
$ curl http://npmjs.org/install.sh | shCompile the C server
$ cd C_server
$ make && gcc -o ./hiredis.o -c ./hiredis.c && g++ -O3 -Wall -o serverTest ./server3.cpp ./*.oYou should install npm. It's a package manager for node.
Install these packages using
$ npm installIn production:
- redis
- socket.io
- express
- jade
- yamlIn development
- nodeunit
- coffee-script
- jitter
- hexy==== Compiling Coffeescript files ====
Run `jitter . .` in your project directory.==== Running Tests ====
Run nodeunit .js