Instead of creating global objects, encapsulates server side js.