added an simple api endpoint. The api is called by both the front end and the mocha test