Server for static webapp

I'm building a client side only webapp written in html5 & javascript, but I still need a server to server these files.

I'm using GruntJS for minifying/concatenating files and I plan to put the compiled website in a folder called dist or something similar.

So I only need a server that handle all requests to my website and load the corrisponding file from /dist so that requesting mysite/style.css loads mysite/dist/load.css.

I also need the server to handle gzip compression, http headers, mime types, cache control and error handling.

Since I'm already using nodejs I thought about a nodejs server like connect, or lactate

For the hosting I'm planning to use heroku (but maybe there are better services for my case), which server do you advise?

Best way for hosting static files in Amazon-CDN, you may have simple logic on heroku basic-html page. You can prepare your own script, with compilation, concantenation, gzipping your files and put them with s3cmd to your s3-bucket on AWS. After that you need to link CDN to s3 bucket - that's all you application will be ready.

Since you are using grunt, and have thought about connect, you could always use the grunt-connect plugin.

To install:

$ npm install grunt-connect

In your grunt.js file:

// Project configuration.
grunt.initConfig({
  connect: {
    yourServer: {
      port: 1337,
      base: 'dist'
    }
  }
});

grunt.loadNpmTasks('grunt-connect');