Question: I am developing a node.js app, and I want to use a module I am creating for the node.js server also on the client side. 

An example module would be circle.js:

```
var PI = Math.PI;

exports.area = function (r) {
  return PI * r * r;
};

exports.circumference = function (r) {
  return 2 * PI * r;
};

```

and you do a simple 

```
var circle = require('./circle')

```

to use it in node.

How could I use that same file in the web directory for my client side javascript?

Answer: 
![Browserify](https://i.stack.imgur.com/5FtLy.png)

[Browserify](https://github.com/substack/node-browserify)

It magically lets you do that.
[Webmake](https://github.com/medikoo/modules-webmake) was made to port CommonJS/NodeJS modules to browser. Give it a try