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

@rockerjs/mvc

v1.0.12

Published

A MVC framework based on Rockerjs/core used by node.js

Downloads

335

Readme

Rockerjs MVC

Build Status Coverage Status npm package License: MIT

简介

Rockerjs-MVC是一套基于配置、具有轻量级容器特性且集成了链路追踪功能的Node.js Web应用框架。

Rockerjs-MVC的容器特性可极致简化你的代码,帮助你快速构建高效、可扩展的应用程序。它采用DI(Dependency Inject)和OOP(Object Oriented Programming)的理念,遵循 “配置大于约定” 的规范,同时提供 Starter机制 实现“模块粒度下配置与约定的融合” ,使用TypeScript强类型语言构建你的应用。

Rockerjs-MVC的所有功能都是基于一个遵循ini配置规范的 "app.${env}.config" 文件来实现的,可提供四种不同环境的配置文件:dev、daily、pre、prod

轻量级容器特性意味着Rockerjs-MVC可管理所有注解标识类的实例化对象,并管理其生命周期、对象间的依赖关系;当使用这些对象时可通过注解直接引用,无需手动实例化或建立对象间依赖。

Starter机制提供某些模块约定俗成的配置并自动初始化,无需开发者在程序中显式操作。当默认配置无法满足时,可通过配置文件配置该Starter相关参数。Starter机制采用基于约定的准则实现,但可基于配置文件进行扩展。

安装

NPM:

$ npm i --save @rockerjs/mvc

使用

import { Logger } from "@rockerjs/common";
import { Application, AbstractApplication } from "@rockerjs/mvc";

@Application
class App extends AbstractApplication {
  public async beforeServerStart(server, args: RockerConfig.Application) {
    Logger.info('beforeServerStart hook ' + args.name + args.uploadDir);
  }
  public static async main(args: RockerConfig.Application) {
    Logger.info('main bussiness '  + args.name + args.uploadDir);
  }
}

文档

Rockerjs-MVC使用教程

Contribute

请参考 Contribute Guide 后提交 Pull Request。

License

MIT