Skip to content

Use the Postgres Adapter with a Postgres URI #2871

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

kulshekhar
Copy link
Contributor

This PR gets Parse Server to use the Postgres adapter if the --databaseURI supplied is of the form postgres://....

@facebook-github-bot
Copy link

@kulshekhar updated the pull request - view changes

Copy link
Contributor

@flovilmart flovilmart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this PR!

@flovilmart flovilmart merged commit 7af3209 into parse-community:master Oct 15, 2016
@kulshekhar kulshekhar deleted the patch-use-postgres-adapter branch October 15, 2016 14:34
@lsxredrain
Copy link

how to config postgres for parse-server?

@kulshekhar
Copy link
Contributor Author

@lsxredrain when starting parse server, specify the --databaseURI in this format postgres://username:password@host:port/db-name

You can also add another --databaseOptions parameter which should be a JSON object. The fields in this object will override those set in the --databaseURI. The values that you can set in this object are user, password, poolSize, host, port, database, ssl, binary, client_encoding, application_name and fallback_application_name

@flovilmart
Copy link
Contributor

Replace he databaseURI by one that starts with postgres and points to your database.

Note that you have to use the latest build by pointer to "parseplatform/Parse-server#latest" in your package.json

@lsxredrain
Copy link

@flovilmart thanks a lot, I try it

@lsxredrain
Copy link

name: 'error',
length: 108,
severity: 'ERROR',
code: '42703',
detail: undefined,
hint: undefined,
position: '33',
internalPosition: undefined,
internalQuery: undefined,
where: undefined,
schema: undefined,
table: undefined,
column: undefined,
dataType: undefined,
constraint: undefined,
file: 'parse_relation.c',
line: '3090',
routine: 'errorMissingColumn' } error: column "password" does not exist
at Connection.parseE (/data/work/psql-parser/parse-server-example/node_modules/pg/lib/connection.js: 539:11)
at Connection.parseMessage (/data/work/psql-parser/parse-server-example/node_modules/pg/lib/connecti on.js:366:17)
at Socket. (/data/work/psql-parser/parse-server-example/node_modules/pg/lib/connection.js :105:22)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at readableAddChunk (_stream_readable.js:176:18)
at Socket.Readable.push (_stream_readable.js:134:10)
at TCP.onread (net.js:543:20)
error: column "password" does not exist
at Connection.parseE (/data/work/psql-parser/parse-server-example/node_modules/pg/lib/connection.js: 539:11)
at Connection.parseMessage (/data/work/psql-parser/parse-server-example/node_modules/pg/lib/connecti on.js:366:17)
at Socket. (/data/work/psql-parser/parse-server-example/node_modules/pg/lib/connection.js :105:22)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at readableAddChunk (_stream_readable.js:176:18)
at Socket.Readable.push (_stream_readable.js:134:10)
at TCP.onread (net.js:543:20)

@manoj-manoharan-backup-old
Copy link

manoj-manoharan-backup-old commented Mar 4, 2017

Error while starting out, i opened a issue please check it #3595

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants