added index.js file which returns either client or server