Static middleware has to stay after the index one

If the static middleware is added before the index delivery middleware (app.get(path)) than the static index.html file gets delivered and the app doesn't work.