Skip to content
KeystoneJS LogoKeystoneJS (α)

Adapter Configuration

Choosing an adapter

Keystone currently provides two database adapters. Choose the Mongoose Adapter for MongoDB or the Knex Adapter for PostgreSQL.

Note: PostgreSQL requires an additional step to create a database.

Installing MongoDB

The simplest way to install MongoDB is using Homebrew.

OSX

brew install mongodb
brew services start mongodb

Other Platforms

Follow the official MongoDB installation guide.

Setup

By default the Mongoose Adapter will attempt to connect to MongoDB as the current user and create a new database using the project name. You can override these options when configuring the Mongoose Adapter.

Installing Postgres

The simplest way to install Postgres is using Homebrew.

OSX

brew install postgres

Other Platforms

For Windows and other platforms see the download instructions on the postgresql.org website.

Setup

By default the Knex Adapter will attempt to connect to a PostgreSQL database as the current user. It will look for a a database matching the project name. You can override these options when configuring the Knex Adapter.

To create database run the following command:

createdb my-database-name

Have you found a mistake, something that is missing, or could be improved on this page? Please edit the Markdown file on GitHub and submit a PR with your changes.

Edit Page