Git Product home page Git Product logo

express-list-routes's Introduction

Labithiotis

This is my public site, its using Preact with ParcelJs and Styled Components. Its deployed to github pages and using Cloudflare to handle inbound traffic (and SSL).

express-list-routes's People

Contributors

kamalyusuf avatar labithiotis avatar yutak23 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

express-list-routes's Issues

Usage with NestJS

Getting errors with the imports.

import expressListRoutes from 'express-list-routes'

import * as expressListRoutes from 'express-list-routes'

import {default as expressListRoutes } from 'express-list-routes'

...
const expressListRoutes = await import('express-list-routes')
const {default: expressListRoutes} = await import('express-list-routes')
const expressListRoutes = (await import('express-list-routes')).default

needs IRouter?

I tried to use expressListRoutes within my node.js/typescript app.

import expressListRoutes from 'express-list-routes';

const routes = express.Router();
...
console.log('::: Available routes are:');
expressListRoutes(routes);

which gave:

src/routes/index.ts:15:19 - error TS2345: Argument of type 'Router' is not assignable to parameter of type 'ExpressApp'.
  Property '_router' is missing in type 'IRouter' but required in type 'ExpressApp'.

any information or hint, where I might be using it wrongly?

[feature request] Add NestJS usage

Happy new year! ๐ŸŽ‰

Excellent package! Thanks to the team. ๐Ÿ”ฅ๐Ÿ‘

This time I want to submit a feature request:

Add NestJS usage.

expressListRoutes(app.getHttpAdapter().getInstance())

Also add a note on importing it like import expressListRoutes from 'express-list-routes'
by enabling esModuleInterop in tsconfig.json of a NestJS app.

suppress logger

Hello. I firstly want to thank you for creating this. It's quite helpful.
I have a question regarding the logger. Is there a way to not send logs to console? Basically turn off the logger.

Support custom logger

Thank you for authoring this! It is very helpful. It'd be awesome if you supported a custom logger / overriding the method used for logging.

Unnecessary prefix on Windows

In windows OS, the log will shows file path instead of just route path

GET      D:\my-route
Example app listening on port 3000

Probably because of `path.resolve``` before the log

List all routes in app

I use bunch of routers in my express 4 app and I'd like to list all routes in app. Is it possible to achieve this with express-list-routes?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.