Closed DavidLarsKetch closed 6 years ago
routes/products/index
routes/employees/index
route
routes/products/
routes/employees/
indexRouter.use(...)
employees/index
products/index
URL
routes.[VERB]
('/', [function])
('/:id', [function])
Each route.use should look like route.use('/[table-name]', require('/[table-name]'));
route.use
route.use('/[table-name]', require('/[table-name]'));
Context
routes/products/index
&routes/employees/index
and eachroute
inroutes/products/
&routes/employees/
Process
indexRouter.use(...)
statements inemployees/index
&products/index
should include the table name.URL
pathroutes.[VERB]
in each individual route should only be('/', [function])
or('/:id', [function])
Expected Result
Each
route.use
should look likeroute.use('/[table-name]', require('/[table-name]'));