- Node.js 6.x Blueprints
- Fernando Monteiro
- 147字
- 2021-07-14 10:35:03
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
推薦閱讀
- Visual C++串口通信開發入門與編程實踐
- Getting Started with CreateJS
- 神經網絡編程實戰:Java語言實現(原書第2版)
- C語言程序設計實訓教程
- Julia機器學習核心編程:人人可用的高性能科學計算
- Mastering Unity Shaders and Effects
- INSTANT Django 1.5 Application Development Starter
- 好好學Java:從零基礎到項目實戰
- Visual C#.NET Web應用程序設計
- Visual Basic程序設計習題與上機實踐
- JavaScript機器人編程指南
- SQL Server 2008中文版項目教程(第3版)
- Data Science Algorithms in a Week
- Drupal 8 Development:Beginner's Guide(Second Edition)
- Mastering Object:Oriented Python(Second Edition)