Ao rodar o script para criar a tabela deu o seguinte erro,
C:\Alura-cursos\api-petshop\api\banco-de-dados>node criarTabelas.js
WARNING: No configurations found in configuration directory:C:\Alura-cursos\api-petshop\api\banco-de-dados\config
WARNING: To disable this warning set SUPPRESS_NO_CONFIG_WARNING in the environment.
C:\Alura-cursos\api-petshop\node_modules\config\lib\config.js:182
throw new Error('Configuration property "' + property + '" is not defined');
^
Error: Configuration property "mysql.banco-de-dados" is not defined
at Config.get (C:\Alura-cursos\api-petshop\node_modules\config\lib\config.js:182:11)
at Object.<anonymous> (C:\Alura-cursos\api-petshop\api\banco-de-dados\index.js:5:12)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object.<anonymous> (C:\Alura-cursos\api-petshop\api\rotas\fornecedores\ModeloTabelaFornecedor.js:2:19)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
config.defalut.
{
"mysql": {
"banco-de-dados": "petshop",
"usuario": "root",
"senha": "1234",
"host": "127.0.0.1"
},
"api": {
"porta": 3000
}
}
O schema petshop já foi criado, a versão do mysql 8.0.