How to use the morgan.default function in morgan

To help you get started, we’ve selected a few morgan examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jimmyleray / Emendare / server / src / index.ts View on Github external
// Global configuration
const port: number = Number(process.env.PORT) || 3000;
const gitlabAPIUrl: string = "";

// Http promise requests
import * as axios from "axios";

// Express Html Application
import * as express from "express";
const app: express.Application = express.default();

// Requests Logger Middleware
import * as morgan from "morgan";

// Function to add API Url to a partial path
const api = (path: string) => gitlabAPIUrl + path;

// Open API CORS Headers
  (req: express.Request, res: express.Response, next: express.NextFunction) => {
    res.header("Access-Control-Allow-Origin", "*");

// Get a specific group with subgroups
app.get("/groups/:id", (req: express.Request, res: express.Response) => {


HTTP request logger middleware for node.js

Latest version published 4 years ago

Package Health Score

76 / 100
Full package analysis