Boilerplate, SocketIO, Jasmine, TypeScript

Boilerplate: https://github.com/8Observer8/boilerplate-socketio-typepescript-unit-tests-jasmine-specs

Run: https://boilerplate-socketio.herokuapp.com/

I use the boilerplate to write the Tic-Tac-Toe game: Writing multiplayer Tic-Tac-Toe game using Babylon.js and TypeScript

My boilerplate boilerplate allows:

  • Add new clients in TypeScript using Socket.io (Now I have two clients: BabylonJS and PixiJS).

  • Build to debug version. I use the AMD compilation and the RequireJS library. The debug version allows to set breakpoint using Chrome extension for VSCode and publish TS examples with a few file on Plunker.

  • Build to release version. I use the CommonJS compication, Browserify and Uglify to create a minified bundle.

  • Build Jasmine specs for server and clients.

  • Build Jasmine specs to debug and to release versions.

  • Build Jasmine specs for shared script like for server. Shared script is scripts in the “shared” folder that are shared by server and client.

  • Set up breakpoints for Jasmine specs on server and on clients.

  • Run Jasmine specs in browser by click on the “Run Unit Tests” button: https://boilerplate-socketio.herokuapp.com

  • Run Jasmine specs in Playground by click on the “Run Unit Tests” button: Plunker - Is point inside a rectangle

  • Run the client and server at the same time to debug in compound mode in VSCode (see docs: Compound launch configurations) when you can set breakpoint at the server and client at the same time.

Step-by-step instruction

  • Will be later
4 Likes

See how it is simple to deploy your application that based of my boilerplate on Heroku:

  • Create a new repository on Github
  • Create a new Node.js web application on Heroku:
    https://www.heroku.com/
  • Set “GitHub” in “Deployment method” on the Deploy tab of heroku
  • Push your changes on GitHub

Your server and client well be deployed automatically on Heroku. Heroku will be automatically deploy your app from Github every time when you push your commits on GitHub. See the “Activity” tab when deployment will be finished.