server side code for chrome extension