<file_sep>'use strict';

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
  const { router, controller } = app;
  router.get('/', controller.home.index);
  router.get('/user/login', 'home.login');
  router.get('/getUrl', 'home.getUrl');
  router.get('/dianping/getAlbum', controller.dianping.getAlbum);
};
<file_sep>module.exports = app => {
  const mongoose = app.mongoose;
  const Schema = mongoose.Schema;

  const firstSchema = new Schema({
    _id: { type: Schema.ObjectId },
    name: { type: String },
    age: { type: Number },
  });
  return mongoose.model('FirstModel', firstSchema, 'first');
};
