1 Star 1 Fork 0

Y T U / back-end

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

一个node后端项目,主要配合meedu-wxapp,也可以自己用于其他项目。

简介

借用express框架搭建的后端服务,不提供前端页面,实现前后端分离(算不上真正的前后端分离,项目比较小(#^.^#)),主要提供接口服务, 对接原数据库,内容较多

功能

  • 数据库的连接
  • sql语句进行增删该查
  • 提供api服务

api

结构

.

  • bin
  • config 配置文件
  • controls 控制器
    • index.js 控制器
  • public 静态文件
  • routers 路由 -index.js 主路由
  • sql 数据库sql语句
    • func.js 封装mysql连接池
    • sql.js sql语句
  • views 视图层(暂时用不到)
  • app.js 启动文件

使用

请先安装好node,mysql

// 安装依赖
npm install
// 本地启动
npm start

// 服务器使用pm2 启动
pm2 start ./bin/www

// IP映射
这里我用宝塔面板直接选择项目根目录

// 注: 阿里云的服务器要开放对外的端口

配置

mysql配置 在config中的db.js填入相关配置信息

License

MIT

MIT License Copyright (c) 2018 YJK 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.

简介

a nodejs back end ️ 展开 收起
JavaScript
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
JavaScript
1
https://gitee.com/ytu94/back-end.git
git@gitee.com:ytu94/back-end.git
ytu94
back-end
back-end
master

搜索帮助