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 🙏

© 2024 – Pkg Stats / Ryan Hefner

vtuzx-core

v2.0.6

Published

core of vtuzx

Downloads

10

Readme

微图知行(vtuzx)开源包

基于mongoDB, log4js 提供http访问, 文件处理(excel, pdf, fs相关), 图像处理, 数据校验等核心功能

使用配置

传配置文件, 需要设置入口全局路径 global.__home,
相关配置文件放在conf文件夹内,
包含系统配置文件, log4js配置文件, banner配置

系统配置方法

调用根目录的index.js的setup方法进行配置,
参数是配置文件名, 默认configure
通过设置环境变量[VTUZX_ENV]区分多环境, 默认dev 标准设置[__home/conf/configure.js]
运行环境[__home/conf/configure_dev.js]
运行环境设置 > 标准设置
例如: 标准配置:

{
    a: 1,
    b: 2,
    c: { c1: 3, c2: 4 }
}

运行环境配置:

{
    b: 22,
    c: { c2: 44, c3: 55 }
}

则最终使用环境为:

{
    a: 1,
    b: 22,
    c: { c1: 3, c2: 44, c3: 55 }
}

日志配置

具体设置内容参照nodejs/log4js, 配置文件默认文件名问log4js.js, 可通过系统配置[system.logConf]进行设置,
通过设置环境变量[VTUZX_ENV]区分多环境, 默认dev
标准设置[__home/conf/log4js.js]
运行环境[__home/conf/log4js_dev.js]
运行环境设置 > 标准设置

banner配置

默认读取conf下的banner.txt
可通过系统配置[system.absoluteBannerPath]指定绝对路径,
可通过系统配置[system.banner]指定conf下的文件名(扩展名固定为.txt)

mongoDB数据库配置

系统配置内指定mongo模块,

{
    mongo: {
        url: '数据库访问路径',
        database: '默认访问数据库',
        scan: '扫描dao路径, 默认[ /src/vtuzx/dao ]',
        scanRegex: '扫描过滤规则, 默认[.*Dao\.js]', 
        except: '配置过程中排除的的文件名内容, [默认[ "Dao" ]',
        dao: '手动加载的dao',
        options: '数据库连接参数, 具体参照nodejs/mongodb',
        sessionSetting: '事务初始设置, 具体参照nodejs/mongodb',
        transactionSetting: '事务启动设置, 具体参照nodejs/mongodb'
        logLevelWhenStart: '启动时的输出日志级别'
    }
}
Dao Class的构造方法, 有两个参数(database, name)\
database可以指定改Dao所属数据库, 默认为系统配置内的database, 
name可以指定对应的collection名, 默认为文件名去除系统配置内的except