app.js: app.use('/', routes);app.use('/reg', routes);app.use('/u/:user',routes);app.use('/post',routes);app.use('doReg',routes);app.use('login',routes);app.use('login',routes);app.use('logout',routes);app.use('/users', users); routes/index.js var exp…