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

cvbsp-directory

v1.3.1

Published

Directory and authentification app built on top of express

Readme

Directory and authentification app built on top of express

install

npm i cvbsp-directory

config

add config.json file (inside the working directory in dev mode, outside in production mode), here is the mandatory parameters:

"URL_MONGO":"mongodb://localhost:27017/",
"DB_NAME":"name_of_db"
"PORT":3333, // port number that you wish to use
"PRIVATE_KEY":"4XAgpTaS1RCSrYZ6K5Kq", // private key to use for the password encryption
"LOG_PATH":"./dev.log", // path to the log file
"LOG_LEVEL" : "debug", // any of this "fatal", "error", "warn", "info", "debug"
"TOKEN_EXPIRY_IN_SEC":86400, // timelapse for expiry of the token for authenticated user in seconds
"REQ_LIMIT_MB":100, // Request size limit in Mb
"SUPERVISOR_PASSWORD":"password", // Supervisor password in clear
"DIR_FILES":"./_Files/" // path to the directory where data will be stored
"DEFAULT_LANG": "fr", // default lang uses if no lang define on user
"DOMAIN_ROOT_NAME": "root",
"PREFIX_URL": "/api/v2",
"STATIC_PATH": "/resources", // relative url to access the doc in DIR_FILES from outside
"EXTERNAL_PATH_TO_FILES": "http://localhost:3000/resources/", // external path to access the file, can be outside of the this app
"DEFAULT_DOMAIN_ID": "xxxxx-xxx-xx-xx-xxxx", // id of the default domain to use when user auto-register
"EMAIL" : { // Email sender configuration
    "HOST":"url_string",
    "PORT":000,
    "SECURE":boolean,
    "USER":"email_adress",
    "PWD":"************",
    "DEFAULT_FROM":"email_adress",
    "FILE_INIT_PATH": "/path/to/emails.json"
},
"DEFAULT_ROOT_SETTINGS": {
    "title": "Cvbsp",
    "logo": { "type" : "file" },
    "primaryColor": { "type" : "color" },
    "secondaryColor": { "type" : "color" },
    "successColor": { "type" : "color" },
    "dangerColor": { "type" : "color" },
    "warningColor": { "type" : "color" },
    "prop1": "value1" // to add new setting
}

licence

the licence file is use to activate or desactivate feature, it can be used with plugins, content is an js object:

{}

data

make sure to create an emails file corrsponding to the path "FILE_INIT_PATH": "/path/to/emails.json" in the config file . email notifications file must have the followings to work properly : { "name" : "RESET_PASSWORD", "subject" : { "en" : "Reset password", "fr" : "Réinitialiser le mot de passe" }, "body" : { "fr" : "<p>Voici votre code pour réinitialiser votre mot de passe</p><p>Code : ##CODE##</p>", "en" : "<p>Below is the code to reset your password</p><p>Code : ##CODE##</p>" }, "isHtml" : true, "isActive" : true }, { "name" : "VERIFY_EMAIL", "subject" : { "en" : "Verify email", "fr" : "Vérifier votre email" }, "body" : { "fr" : "<p>Voici votre code pour vérifier votre email</p><p>Code : ##CODE##</p>", "en" : "<p>Below is the code to verify your email</p><p>Code : ##CODE##</p>" }, "isHtml" : true, "isActive" : true }

use

and then just Use like express:

  • Javacsript:
const cvbspDirectory = require('cvbsp-directory');

const newRouter = require('./controller');
App.use('/path', newRouter);
const server = cvbspDirectory.App.listen(3000, () => {    
    console.log('Express server with cvsbp directory listening on port ' + 3000);
});
  • Typescript:
import { App } from 'cvbsp-directory';
import { newRouter } from './controller';
App.use('/path', newRouter);
const server = App.listen(3000, () => {    
    console.log('Express server listening on port ' + 3000);
    require('./all.spec'); 
});