Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

570
Views
(nodo: 4691) UnhandledPromiseRejectionWarning: SequelizeConnectionError: la conexión finalizó inesperadamente

Gracias por echar un vistazo a esto

Creé una base de datos llamada wikistack, luego intenté conectarla con sequelize , pero este error, "SequelizeConnectionError: Connection terminó inesperadamente"

Dentro de app.js

 const express = require('express'); const morgan = require('morgan'); const path = require('path'); const layout = require('./views/layout'); const { db } = require('./models'); const app = express(); app.use(morgan('dev')); app.use(express.static(path.join(__dirname, 'public'))); db.authenticate()`enter code here` .then(() => { console.log('connected to the database'); }) app.get('/',(req,res) =>{ res.send(layout("")); }); app.listen(1337,function(){ console.log("You can do it!") })

dentro de /modelos/index.js

 const Sequelize = require('sequelize'); const db = new Sequelize('postgres://localhost:1337/wikistack'); module.exports = { db }
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!