GithubHelp home page GithubHelp logo

frankiegu / back-end Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ytu94/back-end

0.0 0.0 0.0 87 KB

🖖node server for meedu-wxapp(适合学习)

License: MIT License

JavaScript 97.03% CSS 0.90% HTML 1.55% Shell 0.52%

back-end's Introduction

一个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

back-end's People

Contributors

ytu94 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.