/luckystarry-mvc

一个仿ASP.NET MVC的 NODEJS 框架

Primary LanguageTypeScriptMIT LicenseMIT

LuckyStarry-MVC

一个轻量的 WebApi 服务

Build Status Build Test Coverage Status Npm Status install size codebeat badge Known Vulnerabilities License Status

Warning

使用须知:本框架仍处于设计开发阶段,很多接口可能会随时调整,建议现阶段慎重使用

Install

npm i -S luckystarry-mvc

Usage

一个简单的启动用例如下所示:

#!/usr/bin/env node

import * as mvc from 'luckystarry-mvc'

mvc.ApplicationBuider.Create().Build().Start()

为了使用 注解 的特性,请在项目运行目录添加 tsconfig.json

{
  "compilerOptions": {
    "experimentalDecorators": true,
    "emitDecoratorMetadata": true
  }
}

然后您就可以使用如下命令启动站点

ts-node/register index.ts

LICENSE

MIT License

Copyright (c) 2018 SUN BO starry@vip.qq.com

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.