1

I have a postgres database and want to set the dialect on sequelize as postgres. I followed all the instructions on the sequelize.js site mainly:

var Sequelize = require("sequelize");
var sequelize = new Sequelize('database', 'postgres', 'pword', {
host: "localhost", //your server
port: 5432 //server port
dialect: 'postgres' 
});

I also did these modifications in the package.json file:

"name": "hello-world",
"description": "hello world test app",
"version": "0.0.1",
"private": true,
"dependencies": {
  "express": "3.1",
  "pg": "0.8.8",
  "sequelize": "1.6.x"
}

But when I try to run node app.js I get this error: dialect: 'postgres' ^^^^^^^ SyntaxError: Unexpected identifier at Module._compile (module.js:437:25)

I'm really confused what is going on, and why I'm still getting this error. Any ideas on how to fix this?

1 Answer 1

1

Try removing the comment lines after host and port.

Sign up to request clarification or add additional context in comments.

1 Comment

My pleasure. Getting started can be the hardest part, but I've been really happy with Sequelize after two intense months. Stick with it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.