Initialize mnesia and cowboy when the application starts.