Monday 12 June 2017

Pinging feature for front-end nodejs app

I have a web application that is separated into a front-end and back-end. The front-end is written in reactjs and renders some data, the back-end is written in nodejs with an express server, and sends data to the front-end to be rendered when a user hits the client. The front-end and back-end run in separate docker containers.

The containers will be running in aws and will need to respond to aws's healthchecks. Since I'm running express on the back-end I'm using express-ping to do this. When an application hits back-end/ping it responds with some information but most importantly lets aws know that it is running.

I need to implement a similar method on the front-end. Since the front-end's only job is to do some rendering, I don't particularly want to setup an express server just to implement a ping feature. I've looked into how you could do this with webpack, but it really only lets you proxy requests to a different URL.

Does anyone have any clever ideas on how this can be accomplished or alternative solutions such as if aws has other ways of determining if an application is running?

Thanks.



via Alex Cauthen

No comments:

Post a Comment