Giter Site home page Giter Site logo

expressapi's Introduction

关于expressapi

expressapi代码仓库用来共享小林在Youtube频道小林方程式中的nodejs express mysql和redis搭建api接口的课程代码。

如何使安装

  • 下载expressapi的代码至本地
  • 如果本机没有安装mysql postgres, 请进入docker目录,按照README文档在docker上安装mysql和postgres
  • 复制.env.template文件并重命名为.env
  • 在.env里填入你的mysql, postgres数据库连接信息
  • 运行 npm install 安装好所有依赖包

运行命令

数据库连接和连接池

命令

node db/mysql.jsnode db/mysqlpool.js, node db/pg.js, node db/pgpool.js

youtue视频

https://youtu.be/TLJVwFPObUA

sequelize新建变更表和执行crud操作

node db

youtue视频

https://youtu.be/YHbWPzW1hy8

https://youtu.be/jnNU3I-iuv8

启动API服务

node . 或者 node index.js

youtube视频

https://youtu.be/yQvGbocoWqE

API错误处理

https://youtu.be/u3-WAGEn0W8

expressapi's People

Contributors

codewithlarry 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.