2020-02-07 16:55:43 +00:00
|
|
|
const express = require("express");
|
|
|
|
|
2020-02-08 18:59:51 +00:00
|
|
|
const citiesRouter = require('./routes/citiesRouter');
|
|
|
|
const roadsRouter = require('./routes/roadsRouter');
|
|
|
|
const countriesRouter = require('./routes/countriesRouter');
|
|
|
|
const pathRouter = require('./routes/pathRouter')
|
|
|
|
|
2020-02-07 16:55:43 +00:00
|
|
|
|
|
|
|
const server = express();
|
|
|
|
|
|
|
|
server.use(express.json());
|
|
|
|
|
2020-02-08 18:59:51 +00:00
|
|
|
server.use('/api/cities', citiesRouter);
|
|
|
|
server.use('/api/roads', roadsRouter);
|
|
|
|
server.use('/api/countries', countriesRouter);
|
|
|
|
server.use('/api/path', pathRouter);
|
2020-02-07 16:55:43 +00:00
|
|
|
|
|
|
|
module.exports = server;
|