Set up basic javascript architecture