Route.get() requires callback functions but got a "object Undefined"
<p>I am learning making Todo app.
On the website, I am studying is <a href="https://coderwall.com/p/4gzjqw/build-a-javascript-todo-app-with-express-jade-and-mongodb" rel="noreferrer">https://coderwall.com/p/4gzjqw/build-a-javascript-todo-app-with-express-jade-and-mongodb</a></p>
<p>I typed as instruction describes,</p>
<p><strong>app.js</strong></p>
<pre class="lang-js prettyprint-override"><code>var main = require('./routes/main');
var todo = require('./routes/todo');
var todoRouter = express.Router();
app.use('/todos', todoRouter);
app.get('/', main.index);
todoRouter.get('/',todo.all);
todoRouter.post('/create', todo.create);
todoRouter.post('/destroy/:id', todo.destroy);
todoRouter.post('/edit/:id', todo.edit);
</code></pre>
<p><strong>/routes/todo.js</strong></p>
<pre class="lang-js prettyprint-override"><code>module.exports ={
  all: function(req, res){
    res.send('All todos');
  },
  viewOne: function(req, res){
    console.log('Viewing '+req.params.id);
  },
  create: function(req, res){
    console.log('Todo created');
  },
  destroy: function(req, res){
    console.log('Todo deleted');
  },
  edit: function(req, res){
    console.log('Todo '+req.params.id+' updated');
  }
};
</code></pre>
<p>and I got this error message</p>
<blockquote>
<p>Error: Route.get() requires callback functions but got a [object
Undefined]</p>
</blockquote>
<p>Did I miss something here?</p>