Wednesday, January 26, 2011

Detect Naughty Pictures and Video with Nude.js

Nude.js 

No, Nude.js isn't a Node.js parody or alternative. In fact, I was kind of disappointed to discover that it wasn't. I've become that special sort of geek that would rather read about server side JavaScript than about nudity.

But this is actually pretty cool. It may seem prudish, but if you have antiporn rules you need to enforce on any sort of Web app that allows uploads, this could be helpful. The author, Patrick Wied, suggests it could be used in client-side proxies to ensure child-safe surfing.

Working
  1. You use your web browser to make a request for "/about.html" on a Node.js web server.
  2. The Node server accepts your request and calls a function to retrieve that file from disk.
  3. While the Node server is waiting for the file to be retrieved, it services the next web request.
  4. When the file is retrieved, there is a callback function that is inserted in the Node servers queue.
  5. The Node server executes that function which in this case would render the "/about.html" page and send it back to your web browser.

No comments: