Socket
Book a DemoInstallSign in
Socket

hpyer-server

Package Overview
Dependencies
Maintainers
1
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hpyer-server

An Module-MVC framework for Node.js

latest
Source
npmnpm
Version
2.2.4
Version published
Maintainers
1
Created
Source

hpyer-server 2.x

本项目是本人结合实际项目中的使用情况,提炼出来的 Node.js 的服务端框架。框架采用 Module-MVC 模式,基于 koa2 框架开发,并叠加了其他功能。

2.x 用 Typescript 重写,对 vscode 更加友好

功能特点

  • 基于 Koa2 框架
  • 关系数据库操作(暂支持:MySql)
  • 缓存操作(暂支持:文件、Redis)
  • 视图模版(暂支持:nunjucks)

使用方式

// 引入 hpyer-server 的 HpyerApplication 类
const { HpyerApplication } = require('hpyer-server');

// 相关配置项
let cfg = {
  port: 1234,
  ...
};

// 实例化应用
let Hpyer = new HpyerApplication;

// 启动服务
await Hpyer.start(cfg);

配置项

详见:DefaultConfig.js

DEMO

详见:test

Keywords

hpyer

FAQs

Package last updated on 30 Jun 2021

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