module.exports = function(crowi, app) {
  const controllers = crowi.controllers
  const middlewares = crowi.middlewares
  const form = require('../form')

  const routes = {
    Admin: require('./admin')(crowi, app, form),
    API: require('./API')(crowi, app, form),
    Login: require('./login')(crowi, app, form),
    Me: require('./me')(crowi, app, form),
  }

  var multer = require('multer')
  var uploads = multer({ dest: crowi.tmpDir + 'uploads' })

  const {
    Page: page,
    Login: login,
    Logout: logout,
    Me: me,
    Installer: installer,
    User: user,
    Attachment: attachment,
    Comment: comment,
    Search: search,
    Share: share,
    ShareAccess: shareAccess,
    Notification: notification,
    Backlink: backlink,
    Slack: slack,
  } = controllers

  const {
    LoginRequired: loginRequired,
    FileAccessRightOrLoginRequired: fileAccessRightOrLoginRequired,
    EncodeSpace: encodeSpace,
    AccessTokenParser: accessTokenParser,
    CsrfVerify: csrf,
    ApplicationNotInstalled: applicationNotInstalled,
    ApplicationInstalled: applicationInstalled,
  } = middlewares

  app.use(routes.Admin)
  app.use(routes.Login)
  app.use(routes.Me)
  app.use('/_api', routes.API)

  app.get('/', loginRequired, page.pageListShow)

  app.get('/installer', applicationNotInstalled, installer.index)
  app.post('/installer/createAdmin', applicationNotInstalled, form.register, csrf, installer.createAdmin)

  app.post('/register', form.register, csrf, login.register)
  app.get('/register', applicationInstalled, login.register)
  app.get('/google/callback', login.googleCallback)
  app.get('/github/callback', login.githubCallback)
  app.get('/logout', logout.logout)

  app.get('/:id([0-9a-z]{24})', loginRequired, page.api.redirector)
  app.get('/_r/:id([0-9a-z]{24})', loginRequired, page.api.redirector) // alias
  app.get('/files/:id([0-9a-z]{24})', fileAccessRightOrLoginRequired, attachment.api.redirector)

  app.get('/_notifications', accessTokenParser, loginRequired, notification.notificationPage)

  app.get('/_search', loginRequired, search.searchPage)
  app.get('/_api/search', accessTokenParser, loginRequired, search.api.search)

  app.get('/_share/:uuid([0-9a-z-]{36})', share.pageShow)

  app.get('/_api/check_username', user.api.checkUsername)
  app.post('/_api/me/picture/upload', loginRequired, uploads.single('userPicture'), me.api.uploadPicture)
  app.get('/_api/user/bookmarks', loginRequired, user.api.bookmarks)
  app.get('/_api/user/recentlyViewed', loginRequired, user.api.getRecentlyViewedPages)

  app.get('/user/:username([^/]+)/bookmarks', loginRequired, page.userBookmarkList)
  app.get('/user/:username([^/]+)/recent-create', loginRequired, page.userRecentCreatedList)

  // HTTP RPC Styled API (に徐々に移行していいこうと思う)
  app.get('/_api/users.list', accessTokenParser, loginRequired, user.api.list)
  app.get('/_api/comments.get', accessTokenParser, loginRequired, comment.api.get)
  app.post('/_api/comments.add', form.comment, accessTokenParser, loginRequired, csrf, comment.api.add)
  app.post('/_api/likes.add', accessTokenParser, loginRequired, csrf, page.api.like)
  app.post('/_api/likes.remove', accessTokenParser, loginRequired, csrf, page.api.unlike)

  app.get('/_api/backlink.list', accessTokenParser, loginRequired, backlink.api.list)

  app.get('/_api/shares/accesses.list', accessTokenParser, loginRequired, shareAccess.api.list)

  app.post('/_api/slack/event', slack.api.handleEvent)

  app.post('/_/edit', form.revision, loginRequired, csrf, page.pageEdit)
  app.get('/trash/$', loginRequired, page.deletedPageListShow)
  app.get('/trash/*/$', loginRequired, page.deletedPageListShow)
  app.get('/*/$', loginRequired, encodeSpace, page.pageListShow)
  app.get('/user/:username([^/]+)', loginRequired, page.userPageShow)
  app.get('/*', loginRequired, encodeSpace, page.pageShow)
}

@@ -360,19 +360,21 @@
 %0A  %7D%0A%0A  
-var
+const
  multer 
@@ -399,11 +399,13 @@
 )%0A  
-var
+const
  upl

Use const