kwhinnery / todomvc-plusplus

TodoMVC++ Sample Application
MIT License
93 stars 148 forks source link

Issue with user authentication when I try to migrate #49

Open kinsomicrote opened 7 years ago

kinsomicrote commented 7 years ago

Hello,

When I run sequelize db:migrate I get the error below:

Sequelize [Node: 6.10.1, CLI: 2.7.0, ORM: 3.30.4]

Loaded configuration file "db/database.js".
Using environment "development".
Unable to connect to database: SequelizeConnectionError: password authentication failed for user 

How do I fix it? So far nothing on Google has worked.

Thanks.

JayFischer commented 6 years ago

@kinsomicrote -- I would recommend using the user.js file with a new databaseUrl config -- postgres://role:password@server:port/db. Make sure your PG server is running and you have a role created with a password for the tables.

Example config/user.js:

"use strict";

let config = {}

config.databaseUrl = "postgres://username:pasword@localhost:5432/todos"

module.exports = config

Next, run sequelize db:migrate.