I've recently been busy refactoring our api build for Hunteed and the result looks like it could be open-sourced.
So Here it is, an edge-build for developing a node-express api using modern tools such as Docker, @typescriptlang, @codeship, mocha
aherve/typescript-express-docker_typescript-express-docker - Dockerized node-express application, written in typescript_github.com
git clone https://github.com/aherve/typescript-express-docker.git
Some of the cool features it provides :
typo: public exists but not puublic
Typescript knows that View.count() will return a number. You can't expect the result to be a string.
In my opinion, there is no coming back to javascript once you tried typescript. It just makes development & maintenance several times faster, while ensuring preventing MANY runtime bugs.
Await/Async usage
Promise style usage
mocha Unit tests are launched at each change. They are written in the cool ES7-like syntax, but are run against transpiled js code. I particularly like this await syntax:
Continuous testing: Easy as pie : we use docker to build our app and run a local server. Codeship can run the exact same container to run the tests so there is no discrepancy between the different environments. Almost no additional work to do, and you can browse the result anytime you like:
Hope you like it :)