import express from 'express';
import logger from 'morgan';
import bodyParser from 'body-parser';
import allRoutes from '../config/routes';
// import docRouter from './routes/Document';
// import roleRouter from './routes/Role';

// Set up the express app
const app = express();

// Log requests to the console.
app.use(logger('dev'));

// Parse incoming requests data, this will happen on every request
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: false }));

app.get('/', (req, res) => {
  res.status(200).send({ message: 'Welcome to Document Management System' });
});

app.use('/users', allRoutes.user);
// app.use('/documents', docRoutes);
// app.use('/roles', roleRouter);

app.get('*', (req, res) => {
  res.status(404).send({ message: 'REQUEST PAGE NOT FOUND' });
});

export default app;

@@ -121,110 +121,14 @@
 '../
-config/routes';%0A// import docRouter from './routes/Document';%0A// import roleRouter from './routes/Role
+routes
 ';%0A%0A
@@ -530,19 +530,16 @@
 .user);%0A
-// 
 app.use(
@@ -556,23 +556,29 @@
 s', 
-doc
+all
 Routes
+.document
 );%0A
-// 
 app.
@@ -595,18 +595,22 @@
 s', 
-role
+all
 Route
-r
+s.role
 );%0A%0A

delete unused imports and update routes path [#144369551]