compiling and viewing in localhost is working for mac