txp_miss

1.0.19 • Public • Published

missMVC

fast create web app

搭建条件

node@vension > 7.0.X express

快速搭建项目

1.配置文件

module.exports = {
"HOST" : { name           : "bbs"   ,port : 3009
} ,"APPLICATION_PATH" : $path.resolve("application") //核心项目目录
,"STATIC_PATH" : $path.resolve("public") //静态资源
,"VIEW_PATH" : $path.resolve("resource/view") //模板文件
,"LOG_PATH" : $path.resolve("log") //log地址
,"PAGE_ERROR" : {"ctrl":"http/controller/ ErrorController@index"} //Error页面处理
,"static_access_allow" : true //静态资源是否跨域
,"html_engine" : "hbs" //模板引擎
,"title" : "this is app"
,"email" : "txp_email@126.com"
,"trust_proxy" : ["127.0.0.1"]
}

2.启动文件

"use strict" ;
const miss = require("txp_miss")
let config = require("../miss.config") //配置文件文件名称
miss.config(config)
miss.createApp();
module.exports = miss.run()

3.application文件结构

application
-- config //项目配置
-- tsp //tsp配置
-- tspConfig.js //分发配置
-- tspServer.js //服务器配置
-- http
-- controller //控制器
-- middleware //中间件
-- server // 代理接口文件
-- router //路由
-- router.js //路由入口文件

Dependents (0)

Package Sidebar

Install

npm i txp_miss

Weekly Downloads

2

Version

1.0.19

License

ISC

Last publish

Collaborators

  • tangxiaopeng