- 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.
推薦閱讀
- Instant Apache Stanbol
- Java持續交付
- TypeScript實戰指南
- 3D少兒游戲編程(原書第2版)
- Apache Mesos Essentials
- Haxe Game Development Essentials
- 利用Python進行數據分析(原書第3版)
- Getting Started with Hazelcast(Second Edition)
- Mastering ROS for Robotics Programming
- IBM Cognos Business Intelligence 10.1 Dashboarding cookbook
- 移動增值應用開發技術導論
- Advanced Python Programming
- 零基礎學Java第2版
- 征服C指針(第2版)
- Kotlin語言實例精解