官术网_书友最值得收藏!

Chapter 2.  Build a Basic Website Using MySQL Database

In this chapter we will look at some basic concepts of a Node.js application using a relational database, in this case Mysql.

Let's look at some differences between Object Document Mapper (ODM) from MongoDB and Object Relational Mapper (ORM) used by sequelize and Mysql. For this we will create a simple application and use the resources we have available which is sequelize, a powerful middleware for creation of models and mapping database.

We will also use another engine template called Swig and demonstrate how we can add the template engine manually.

In this chapter we will cover:

  • How to use the Swig template engine
  • Changing default routes from an express generator to the MVC approach
  • Installing Squelize-CLI
  • How to use ORM with Sequelize Models
  • Working with database migrations scripts
  • How to dealing with MySQL database relations
主站蜘蛛池模板: 嘉定区| 肇庆市| 湛江市| 容城县| 天全县| 石首市| 合水县| 霍林郭勒市| 苏尼特左旗| 八宿县| 亳州市| 淳化县| 丰原市| 南城县| 宜兴市| 旺苍县| 盐源县| 临夏县| 海盐县| 镇宁| 嘉鱼县| 楚雄市| 云和县| 苍山县| 根河市| 蒲城县| 班玛县| 自治县| 阳山县| 礼泉县| 钦州市| 府谷县| 嘉黎县| 镇平县| 四平市| 柘荣县| 抚顺市| 蒙自县| 图片| 定兴县| 瓮安县|