mirror of
https://github.com/bellingcat/datasheet-server.git
synced 2026-06-15 06:48:32 +03:00
Clean master commit
This commit is contained in:
17
src/middleware/index.js
Executable file
17
src/middleware/index.js
Executable file
@@ -0,0 +1,17 @@
|
||||
import {Router, next} from "express";
|
||||
import {mapboxAccessToken} from "../config";
|
||||
import morgan from "morgan";
|
||||
import mapbox from "./mapbox";
|
||||
|
||||
export default ({config, db}) => {
|
||||
let routes = Router();
|
||||
|
||||
/* logging middleware */
|
||||
routes.use(morgan("dev"));
|
||||
|
||||
if (mapboxAccessToken) {
|
||||
routes.get("/mapbox/:z/:y/:x", mapbox(mapboxAccessToken));
|
||||
}
|
||||
|
||||
return routes;
|
||||
};
|
||||
Reference in New Issue
Block a user