Creating a controller using mongo example.