- 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.
推薦閱讀
- 演進式架構(原書第2版)
- Getting Started with Citrix XenApp? 7.6
- Java入門很輕松(微課超值版)
- Apache Hive Essentials
- Learn WebAssembly
- 微信公眾平臺開發:從零基礎到ThinkPHP5高性能框架實踐
- C語言程序設計教程
- Raspberry Pi Home Automation with Arduino(Second Edition)
- C#程序設計教程(第3版)
- C語言程序設計實訓教程與水平考試指導
- Python Machine Learning Blueprints:Intuitive data projects you can relate to
- 深入實踐DDD:以DSL驅動復雜軟件開發
- Python一行流:像專家一樣寫代碼
- 基于GPU加速的計算機視覺編程:使用OpenCV和CUDA實時處理復雜圖像數據
- Practical Maya Programming with Python