Changing cors example to use cors module for better code isolation and community support