I've written a small animation using node, express and the TweenJS library
Published on heroku for you to see here.
Currently when you click view source you get the following source.
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.