2017-04-20 Code infrastructure

Code infrastructure

The last couple of weeks, I have worked a bit on my JavaScript HTML5/app development tooling. I now have minimal configuration for getting new projects up and running. A new project just needs:

  • package.json with package name
  • $NAME_OF_PACKAGE.js the source code as literate code.

and then documentation, web-site, browser-bundle, npm module etc. is generated from this.

The steps I go though when creating a new project is:

  • simple-javascript create $PACKAGE_NAME which creates the
  • create github repository, and enable webpage from master branch.
  • travis enable
  • optionally travis setup npm, if I want to release it as a module.
  • optionally add Dockerfile and enable automatic build on hub.docker.com, if I want it to be installable on the server.

During development I just yarn dev and yarn release, and commit and push to github.

I have also simplified my server setup.

  • CouchDB is my database of choice, – it is generic / easy to use from HTML5/apps, so you do not need additional server code to talk with it.
  • A simple pubsub server that allows HTML5/apps to communicate with eachother (and signal webrtc-p2p connections).
  • A simple service runner, that runs HTML5/apps as services, based on a dynamic configuration in CouchDB. This means that I have the same APIs, and developer experience, when making services as when I write apps.