title: How to build and then deploy express server in folder structure and TypeScript to Heroku
body: <p>I want to build and deploy my MEAN app to Heroku. I can deploy the front end part and then it works and is accessible on Heroku provided website, but I do not know how to correctly compile and build the server, which I have in folder structure and also in TypeScript. It looks like this - <a href="https://i.stack.imgur.com/72eNP.png" rel="nofollow noreferrer">myCodeStructure</a> where src folder is generated by Angular CLI.</p>
  
  <p>I googled around, checked <a href="https://devcenter.heroku.com/articles/mean-apps-restful-api" rel="nofollow noreferrer">https://devcenter.heroku.com/articles/mean-apps-restful-api</a>, but it was always with simple server.js file and NPM start with node server.js.</p>
  
  <p>But how do I first transpile my server to javascript, build it, and then run it?</p>