- Node.js 6.x Blueprints
- Fernando Monteiro
- 125字
- 2021-07-14 10:35:05
Editing the config.js file with database credentials
As we can see, the sequelize
command creates many files, including a database configuration file. This file has a sample configuration for application databases.
- Open
config/config.json
and edit thedevelopment
tag with our database details, as the following highlighted code:{ "development": { "username": "root", "password": "", "database": "mvc_mysql_app", "host": "127.0.0.1", "port": "3306", "dialect": "mysql" }, "test": { "username": "root", "password": null, "database": "database_test", "host": "127.0.0.1", "dialect": "mysql" }, "production": { "username": "root", "password": null, "database": "database_production", "host": "127.0.0.1", "dialect": "mysql" } }
Tip
Note that I'm using user root with no password to connect with my database, if you have a different user or are using a different password, replace the previous code with your own credentials.
推薦閱讀
- 從零開始構建企業級RAG系統
- 看透JavaScript:原理、方法與實踐
- Network Automation Cookbook
- UI智能化與前端智能化:工程技術、實現方法與編程思想
- Mastering Python Networking
- Java 9模塊化開發:核心原則與實踐
- Windows Server 2016 Automation with PowerShell Cookbook(Second Edition)
- PHP 7+MySQL 8動態網站開發從入門到精通(視頻教學版)
- Learning Unity 2D Game Development by Example
- HTML5與CSS3基礎教程(第8版)
- 蘋果的產品設計之道:創建優秀產品、服務和用戶體驗的七個原則
- Couchbase Essentials
- Python 3 數據分析與機器學習實戰
- IoT Projects with Bluetooth Low Energy
- Node.js從入門到精通