npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@creative-web-solution/express-layer-remote-api

v0.0.5

Published

Plugins to allow access to clear the cache, view and clear logs.

Readme

Remote API

Plugins to allow access to clear the cache, view and clear logs directly from some html pages.

This plugin only works with ExpressLayer.

Install

Install package:

npm install @creative-web-solution/express-layer-remote-api

Then, in the expressLayerConfiguration.ts of your project:

import RemoteApiFactory from "@creative-web-solution/express-layer-remote-api";

export const expressLayerConfiguration: ExpressLayerOptions = {
    ...,
    "addPlugins": async (expressLayer: ExpressLayer) => {
      return [new RemoteApiFactory()]
    }
};

Configuration


In the parameters.json, set:

  • remote_access_token => a secret tokent
  • remote_access_method => the http method to access the api: get, rest or post

Here the url to access the API in the different method:

  • get => https://yourdomain/api/tools/someaction?token={token}
  • rest => https://yourdomain/{token}/api/tools/someaction
  • post => https://yourdomain/api/tools/someaction + a token field in the post body.

Url display


You can see all generated urls in the console with the command:

npm run console exportRemoteAPIUrl

You can also generate a small HTML code that you can save in a .html file :

npm run console exportRemoteAPIUrl -- --html

If the remote API mode is post, it will always display the HTML code, as you can't access it with a simple url.

For simplicity, all examples below will use the rest method:

Clear cache


You can remotly clear the cache by calling: https://yourdomain/{token}/api/tools/clearcache.

  • /{token}/api/tools/clearcache => Clear all caches
  • /{token}/api/tools/clearcache?args=front => Empty public/assets/js_config
  • /{token}/api/tools/clearcache?args=back => Empty var/cache

Log viewer


Log table: https://yourdomain/{token}/api/tools/viewlogs

You can remotly view the application logs by calling:

  • https://yourdomain/{token}/api/tools/viewlogs/app/log
  • https://yourdomain/{token}/api/tools/viewlogs/app/exception

Clear logs


You can remotly clear the cache by calling: https://yourdomain/{token}/api/tools/clearlogs.

  • /{token}/api/tools/clearlogs => Clear all logs
  • /{token}/api/tools/clearlogs?args=app => Clear application logs