Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
channel9 demo of nodejs + mongodb + graphicsmagick
JavaScript
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
public
views
.gitignore
README.md
package.json
server.js

README.md

channel9

This is the source from this channel 9 demo.



installation

Install Nodejs, GraphicsMagick, and MongoDB.

> git clone https://github.com/aheckmann/channel9.git
> cd channel9
> npm i

running

MongoDB must already be running. Specify your connection string by set the CHANNEL9_MONGO environment variable. If not set, the application will attempt to connect to the test database on localhost:27017.

> node server.js

// passing your own connection string
> CHANNEL9_MONGO=mongodb://localhost:99999 node server.js

goals

Demonstrate the power of nodejs streams and their compatibility with both child_processes and MongoDB by streaming uploads through an express application, directly into GridFS for storage, and back out of MongoDB, through a graphicsmagick child_process with custom command line flags set, and finally piped back to an http response. This demo app was run on an Ubuntu vm created and running on Microsoft Azure.

  in
------
clients file system -> nodejs (express) application -> pipe -> gridfs


  out
------
gridfs -> pipe -> graphicsmagick -> pipe -> http response

Something went wrong with that request. Please try again.