This is a simple Api template for MVC using node. It is used for writing standard api.
项目地址:(git clone
)
git clone https://github.com/carlguo2016/api-template-using-node.git
通过npm
安装本地服务第三方依赖模块(需要已安装Node.js)
npm install
启动服务(http://127.0.0.1:3000)
npm start
本地新建test数据库, 导入测试数据库
例如访问注册接口: http://127.0.0.1:3000/v1/user/register
. ├── README.md ├── package.json // 项目配置文件 ├── app.js // 项目入口 ├── api.js // 项目api列表配置 ├── lib // 各种工具类和主要的api处理 ├── model // Model ├── controller // Controller ├── service // 项目业务逻辑