Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/adityab/memecached
ZOMG Memes! Realtime! Node.js! Kittehs! memecached is a community meme generator website/app written with Node.js. Meme publishing and consumption is realtime thanks to Now.js.
https://github.com/adityab/memecached
Last synced: 7 days ago
JSON representation
ZOMG Memes! Realtime! Node.js! Kittehs! memecached is a community meme generator website/app written with Node.js. Meme publishing and consumption is realtime thanks to Now.js.
- Host: GitHub
- URL: https://github.com/adityab/memecached
- Owner: adityab
- Created: 2011-12-28T06:32:22.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2012-01-04T12:39:59.000Z (almost 13 years ago)
- Last Synced: 2024-08-02T14:09:05.171Z (3 months ago)
- Language: JavaScript
- Homepage:
- Size: 103 KB
- Stars: 50
- Watchers: 4
- Forks: 15
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Memecached
==========Love **memes**?
Want to generate memes and share them with everyone in **real-time**?
Use **Memecached**.
## About
Memecached is an **extremely** lightweight meme sharing service, written entirely in Javascript. The server itself, `app.js`, is exactly 50 lines of code.
All meme images are stored in a public Dropbox directory. It differs from conventional meme generator apps in that there is **zero** server-side image handling code.
Memes are shared in real-time using `now.js`, so once you hit **Publish**, everyone who is connected will see your meme image pop itself into the list.## How it works
All meme template images are stored on Dropbox.
- When a new meme is published, the server takes a JSON object from the client, containing the meme `name` and `text`. No image whatsoever.
- The received meme object is inserted into the mongo collection `memes` with a date timestamp added to it. The object is also sent to all connected clients immediately so that they may update their timelines. This also means that no further database queries are required to retrieve new memes.
- When a client connects, the last few (25) memes are queried from the database and sent back. This can further be optimized by having an in-memory queue of the most recent memes, in addition to the database.
- All meme generation is done entirely **client-side**, by drawing the text over the images using **Canvas**. The client doesn't have to download images, and the server doesn't have to handle them at all.
## How to run
1. First, run `mongod` to start the Mongo daemon.
2. Next, run the server: `node app.js`
3. Point your browser to `http://localhost:8080`.
4. Bask in Memetic paradise.