parse-server README

The project's README from github.com/parse-community/parse-server. As one markdown file: README.md.

parse-repository-header-server


Build Status Build Status Snyk Badge Coverage auto-release

Node Version MongoDB Version Postgres Version

npm latest version npm alpha version

[Backers on Open Collective][open-collective-link] [Sponsors on Open Collective][open-collective-link] Forum Twitter Chat


Parse Server is an open source backend that can be deployed to any infrastructure that can run Node.js. Parse Server works with the Express web application framework. It can be added to existing web applications, or run by itself.

The full documentation for Parse Server is available in the wiki. The Parse Server guide is a good place to get started. An API reference and Cloud Code guide are also available. If you're interested in developing for Parse Server, the Development guide will help you get set up.


A big thank you 🙏 to our sponsors and backers who support the development of Parse Platform!

Bronze Sponsors

Bronze Sponsors


Flavors & Branches

Parse Server is available in different flavors on different branches:

Long Term Support

Long-Term-Support (LTS) is provided for the previous Parse Server major version. For example, Parse Server 5.x will receive security updates until Parse Server 6.x is superseded by Parse Server 7.x and becomes the new LTS version. While the current major version is published on branch release, a LTS version is published on branch release-#.x.x, for example release-5.x.x for the Parse Server 5.x LTS branch.

⚠️ LTS versions are provided to help you transition as soon as possible to the current major version. While we aim to fix security vulnerabilities in the LTS version, our main focus is on developing the current major version and preparing the next major release. Therefore we may leave certain vulnerabilities up to the community to fix. Search for pull requests with the specific LTS base branch to see the current open vulnerabilities for that LTS branch.

Getting Started

The fastest and easiest way to get started is to run MongoDB and Parse Server locally.

Running Parse Server

Before you start make sure you have installed:

Compatibility

Node.js

Parse Server is continuously tested with the most recent releases of Node.js to ensure compatibility. We follow the Node.js Long Term Support plan and only test against versions that are officially supported and have not reached their end-of-life date.

Version Minimum Version End-of-Life Parse Server Support
Node.js 18 18.20.4 April 2025 <= 8.x (2025)
Node.js 20 20.19.0 April 2026 <= 9.x (2026)
Node.js 22 22.12.0 April 2027 <= 10.x (2027)
Node.js 24 24.11.0 April 2028 <= 11.x (2028)

MongoDB

Parse Server is continuously tested with the most recent releases of MongoDB to ensure compatibility. We follow the MongoDB support schedule and MongoDB lifecycle schedule and only test against versions that are officially supported and have not reached their end-of-life date. MongoDB "rapid releases" are ignored as these are considered pre-releases of the next major version.

Version Minimum Version End-of-Life Parse Server Support
MongoDB 6 6.0.19 July 2025 <= 8.x (2025)
MongoDB 7 7.0.16 August 2026 <= 9.x (2026)
MongoDB 8 8.0.4 TDB <= 10.x (2027)

PostgreSQL

Parse Server is continuously tested with the most recent releases of PostgreSQL and PostGIS to ensure compatibility, using PostGIS docker images. We follow the PostgreSQL support schedule and PostGIS support schedule and only test against versions that are officially supported and have not reached their end-of-life date. Due to the extensive PostgreSQL support duration of 5 years, Parse Server drops support about 2 years before the official end-of-life date.

Version PostGIS Version End-of-Life Parse Server Support
Postgres 13 3.1, 3.2, 3.3, 3.4, 3.5 November 2025 <= 6.x (2023)
Postgres 14 3.5 November 2026 <= 7.x (2024)
Postgres 15 3.3, 3.4, 3.5 November 2027 <= 8.x (2025)
Postgres 16 3.5 November 2028 <= 9.x (2026)
Postgres 17 3.5 November 2029 <= 10.x (2027)
Postgres 18 3.6 November 2030 <= 11.x (2028)

Locally

$ npm install -g parse-server mongodb-runner
$ mongodb-runner start
$ parse-server --appId APPLICATION_ID --masterKey MASTER_KEY --databaseURI mongodb://localhost/test

Note: If installation with -g fails due to permission problems (npm ERR! code 'EACCES'), please refer to this link.

Docker Container

$ git clone https://github.com/parse-community/parse-server
$ cd parse-server
$ docker build --tag parse-server .
$ docker run --name my-mongo -d mongo

Running the Parse Server Image

$ docker run --name my-parse-server -v config-vol:/parse-server/config -p 1337:1337 --link my-mongo:mongo -d parse-server --appId APPLICATION_ID --masterKey MASTER_KEY --databaseURI mongodb://mongo/test

Note: If you want to use Cloud Code, add -v cloud-code-vol:/parse-server/cloud --cloud /parse-server/cloud/main.js to the command above. Make sure main.js is in the cloud-code-vol directory before starting Parse Server.

You can use any arbitrary string as your application id and master key. These will be used by your clients to authenticate with the Parse Server.

That's it! You are now running a standalone version of Parse Server on your machine.

Using a remote MongoDB? Pass the --databaseURI DATABASE_URI parameter when starting parse-server. Learn more about configuring Parse Server here. For a full list of available options, run parse-server --help.

Saving and Querying Objects

Now that you're running Parse Server, it is time to save your first object. The easiest way is to use the REST API, but you can easily do the same using any of the Parse SDKs. To learn more check out the documentation.

Connect an SDK

Parse provides SDKs for all the major platforms. Refer to the Parse Server guide to learn how to connect your app to Parse Server.

Running Parse Server elsewhere

Once you have a better understanding of how the project works, please refer to the Parse Server wiki for in-depth guides to deploy Parse Server to major infrastructure providers. Read on to learn more about additional ways of running Parse Server.

Sample Application

We have provided a basic Node.js application that uses the Parse Server module on Express and can be easily deployed to various infrastructure providers:

Parse Server + Express

You can also create an instance of Parse Server, and mount it on a new or existing Express website:

const express = require('express');
const ParseServer = require('parse-server').ParseServer;
const app = express();

const server = new ParseServer({
  databaseURI: 'mongodb://localhost:27017/dev', // Connection string for your MongoDB database
  cloud: './cloud/main.js', // Path to your Cloud Code
  appId: 'myAppId',
  masterKey: 'myMasterKey', // Keep this key secret!
  fileKey: 'optionalFileKey',
  serverURL: 'http://localhost:1337/parse', // Don't forget to change to https if needed
});

// Start server
await server.start();

// Serve the Parse API on the /parse URL prefix
app.use('/parse', server.app);

app.listen(1337, function () {
  console.log('parse-server-example running on port 1337.');
});

For a full list of available options, run parse-server --help or take a look at [Parse Server Configurations][server-options].

Parse Server Health

Check the Parse Server health by sending a request to the /parse/health endpoint.

The response looks like this:

{
  "status": "ok"
}

Status Values

Value Description
initialized The server has been created but the start method has not been called yet.
starting The server is starting up.
ok The server started and is running.
error There was a startup error, see the logs for details.

Configuration

Parse Server can be configured using the following options. You may pass these as parameters when running a standalone parse-server, or by loading a configuration file in JSON format using parse-server path/to/configuration.json. If you're using Parse Server on Express, you may also pass these to the ParseServer object as options.

For the full list of available options, run parse-server --help or take a look at [Parse Server Configurations][server-options].

Basic Options

Client Key Options

The client keys used with Parse are no longer necessary with Parse Server. If you wish to still require them, perhaps to be able to refuse access to older clients, you can set the keys at initialization time. Setting any of these keys will require all requests to provide one of the configured keys.

Access Scopes

Scope Internal data Read-only data (1) Custom data Restricted by CLP, ACL Key
Internal r/w r/w r/w no maintenanceKey
Master -/- r/- r/w no masterKey
ReadOnlyMaster -/- r/- r/- no readOnlyMasterKey
Session -/- r/- r/w yes sessionToken

(1) Parse.Object.createdAt, Parse.Object.updatedAt.

[!NOTE] In Cloud Code, both masterKey and readOnlyMasterKey set request.master to true. To distinguish between them, check request.isReadOnly. For example, use request.master && !request.isReadOnly to ensure full master key access.

Route Allow List

The routeAllowList option restricts which REST API routes are accessible to external clients. When set, all external REST API requests are denied by default unless the route matches one of the configured regex patterns. This is useful for apps where a

parse-server (parse-community/parse-server)

Searching Database…

Что это такое?Parse Server — это опенсорсный бэкенд, который вы размещаете на своей инфраструктуре: его можно развернуть где угодно, где работает Node.js, отдельно или внутри приложения на Express. Он даёт вашему приложению готовый API-слой поверх базы данных, чтобы вам не пришлось писать всю эту обвязку самостоятельно.
Это хостинговый сервис, или мне нужно запускать его самому?Вы запускаете его сами — это именно сервер, а не управляемый облачный сервис. Разворачивайте его на любой инфраструктуре с поддержкой Node.js: как отдельный сервис или как часть существующего веб-приложения на Express.
Как его запустить?Установите Node.js с npm, а также MongoDB или PostgreSQL (с PostGIS 2.2.0 или новее), затем запустите Parse Server локально — Docker необязателен. В вики есть руководство Parse Server, которое проведёт вас через первый запуск, там же находится полная документация.
Насколько свежий Node.js мне нужен?Тестируются только актуально поддерживаемые версии Node.js — версии, у которых закончился срок поддержки, не подходят (в README отмечено, что поддержка Node 18 закончилась в апреле 2025 года). Пакету сейчас требуется Node 20.19+, 22.13+ или 24.11+.
Можно ли спокойно сидеть на LTS-ветке?Не совсем. LTS существует, чтобы помочь перейти на текущую мажорную версию: исправления безопасности там предусматриваются, но команда может оставить некоторые уязвимости в LTS на откуп сообществу, а незакрытые отслеживаются как pull request'ы в LTS-ветке.
Где он может работать?Везде, где работает Node.js — на Windows, macOS и Linux. Есть и задокументированный вариант с Docker-контейнером, а в вики описано, как запускать Parse Server не только на локальной машине.
Как клиентские приложения общаются с сервером?Из коробки доступны REST API и GraphQL API, схема которого генерируется автоматически из ваших классов и может быть изменена в коде. Клиенты обычно подключаются через Parse SDK, а руководство покажет, как создать первый класс и сохранять и запрашивать объекты.
Что такое Cloud Code?Cloud Code — это серверный слой на JavaScript в Parse: ваша кастомная логика выполняется на сервере, а не в клиенте. В вики есть отдельное руководство по Cloud Code вместе со справочником по API.
Что он умеет из коробки, кроме хранения объектов?Довольно многое: хранение файлов через подключаемые файловые адаптеры, push-уведомления через push-адаптер, подтверждение email и сброс пароля, Live Query для обновлений в реальном времени, мультиарендность, логирование и обеспечение идемпотентности записей.
Как он контролирует, кто может читать или менять данные?Доступ ограничивается правами на уровне классов (CLP) и ACL на объектах. Запросы разграничиваются по ключам: session token действует от имени вошедшего пользователя, masterKey даёт полный доступ, readOnlyMasterKey — только чтение, а routeAllowList может запрещать все REST-маршруты, не подходящие под заданные шаблоны.
Size
157.2 MB
Stars
21.4K
Age
10y
Commits · 90 Days