I use the Express node.js. With sequelize(mariadb).
show databases;
Database
> user
> board
I would like to use to create two database connections from a single website.
Directory Structure
models
|- user
|- user.js
|- board
|- board.js
|- comment.js
config.json
{
"development": {
"username": "root",
"password": "test1234",
"database": "testDB",
"host": "127.0.0.1",
"port": 3306,
"dialect": "mariadb",
"define": {
"charset": "utf8",
"collate": "utf8_general_ci"
},
"pool": {
"max": 5,
"min": 0,
"idle": 10000
}
}
}
In the directory structure above, I need how to set sequelize connection.
One database connection has implemented a reporting api. http://docs.sequelizejs.com/en/1.7.0/articles/express/
I have a lot of beginners. This little detail is required. ( ex. directory structure, config.json, index.js and so on )
Sorry, Do not speak English well.
Have a nice day!