Added a demo for the optimizer JavaScript API