New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@rockerjs/mvc

Package Overview
Dependencies
Maintainers
3
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rockerjs/mvc

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

  • 1.0.12
  • latest
  • npm
  • Socket score

Version published
Maintainers
3
Created
Source

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

Keywords

FAQs

Package last updated on 30 Jul 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc