Connect middleware for simple resource mocking in single page apps