I've written a small animation using node, express and the **TweenJS** library

Published on heroku for you to see [here.](http://luke-splashpage-s.herokuapp.com/)

Currently when you click view source you get the following [source.](http://i.imgur.com/7xpNQ5q.png)

Currently all of the javascript is handled client-side and script tags are called in the **.jade files**

To wrap my head around client side and server side javascript I would like to write this app so that the animation is executed server side. This should then stop viewers from being able to see the javascript source easily.

I have researched

> 
> module.exports
> 
> 
> 

and looked at the method of calling

> 
> var animation = require('./animation.js');
> 
> 
> 

for all of the required js files, but I am still stuck and dont quite get how executing the animation server side is possible.

Thanks for your time.