This project is a fully working bootstrap for developping an express-mongoose api with typescript.
- the ONLY install you need is docker. Don't worry about installing mongo, npm or whatever else. Docker-compose takes all the leverage for you (see Installation).
 - Typescript is awesome, and it's not only for frontend users. your code is checked against a LOT of possible mistakes. Try inserting some typos such as 
ssend(...)instead ofsend()and see the console warn you about it. - Possible usage of 
await/asyncand/or Promise-style code => no Callback Hell - Linters are already installed. Keep your code clean.
 - Automated mocha unit testing. Mocha tests are written in ts, but run on the transpiled javascript code. So the actual transpiled application is properly tested.
 - Automated testing by codeship on code commit. They run the same container as you do : if it works at home, it works on CI-servers.
 
- clone the repo
 - run 
docker-compose up - browse 
http://localhost:9000/api/ping,http://localhost:9000/api/ping/fail,http://localhost:9000/api/views/visit - profit
 
After adding new npm or typings package, you will have to rebuild your images as follows:
docker-compose killdocker-compose rmdocker-compose builddocker-compose up
docker-compose run api yarn add <wathever>, then rebuild the images
I'v not yet automated the deployment. For now you can do whatever you want with the /dist folder, that contains the transplied js code.
Typescript validations are awesome:
Typescript support async/await and this build let you take advantage of it. See /api/views for two implementations of a simple mongoose request.
The code now looks like as it where synchronous, but does not block the thread:
The config provided in codeship-services.yml and codeship-steps.yml will trigger a build at each code commit, provided you have connected account.

