snapstub icon indicating copy to clipboard operation
snapstub copied to clipboard

Not all routes are shown when snapstub start is called.

Open chaeron opened this issue 2 years ago • 0 comments

When you start the server, you don't see any routes for folders that only have hashed filenames in them.

In start.js you have the following line defining the glob which is used to figure out which routes to show in printRoutes():

const patterns = methods.map(m => **/${m}.+(json|js|mjs|cjs));

if you change this by adding a * after ${m}:

const patterns = methods.map(m => **/${m}*.+(json|js|mjs|cjs));

then you will see all routes, even for folders that only contained hashed filenames.

Also would be nice if we could turn off the output when calling save programmatically. Or better still also let us pass in a log4js logger instance to use for the output.

Thanks!

chaeron avatar Dec 11 '22 15:12 chaeron