- 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
推薦閱讀
- C及C++程序設(shè)計(jì)(第4版)
- Learning PostgreSQL
- R語(yǔ)言經(jīng)典實(shí)例(原書第2版)
- Oracle 12c中文版數(shù)據(jù)庫(kù)管理、應(yīng)用與開發(fā)實(shí)踐教程 (清華電腦學(xué)堂)
- Linux環(huán)境編程:從應(yīng)用到內(nèi)核
- Nginx Essentials
- Hands-On Full Stack Development with Go
- FPGA Verilog開發(fā)實(shí)戰(zhàn)指南:基于Intel Cyclone IV(進(jìn)階篇)
- C++ System Programming Cookbook
- INSTANT Apache Hive Essentials How-to
- Android高級(jí)開發(fā)實(shí)戰(zhàn):UI、NDK與安全
- Spring Web Services 2 Cookbook
- Building Web and Mobile ArcGIS Server Applications with JavaScript(Second Edition)
- Building Microservices with Go
- 第五空間戰(zhàn)略:大國(guó)間的網(wǎng)絡(luò)博弈