{"id":11525,"library":"parse-server","title":"Parse Server","description":"Parse Server is a self-hostable, open-source backend for applications, providing a compatible API for the Parse platform SDKs. It enables developers to migrate their applications from the hosted Parse.com service (which was deprecated) to their own infrastructure, offering full control over their data and backend logic. The current stable version is 9.8.0. The project maintains an active development pace with frequent alpha releases for new features and bug fixes, typically leading to stable minor versions every few weeks or months. Key differentiators include its adherence to the Parse API specification, allowing seamless migration, extensive customization via Cloud Code and webhooks, and flexible database support (primarily MongoDB and PostgreSQL). It integrates directly with Express.js, making it easy to embed into existing Node.js applications.","status":"active","version":"9.8.0","language":"javascript","source_language":"en","source_url":"https://github.com/parse-community/parse-server","tags":["javascript","typescript"],"install":[{"cmd":"npm install parse-server","lang":"bash","label":"npm"},{"cmd":"yarn add parse-server","lang":"bash","label":"yarn"},{"cmd":"pnpm add parse-server","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Used to serve the Parse API as middleware; Parse Server is an Express module.","package":"express","optional":false},{"reason":"Primary database for Parse Server; a database is required for data persistence.","package":"mongodb","optional":false},{"reason":"The official Parse JavaScript SDK, often used within Cloud Code or for local testing with Parse Server.","package":"@parse/node-lts","optional":true}],"imports":[{"note":"Preferred ESM import. While CJS is supported, ESM is standard for modern Node.js applications and recommended for TypeScript.","wrong":"const ParseServer = require('parse-server').ParseServer;","symbol":"ParseServer","correct":"import { ParseServer } from 'parse-server';"},{"note":"The GraphQL server is typically imported from a specific internal path, not directly from the main package export.","wrong":"import { ParseGraphQLServer } from 'parse-server';","symbol":"ParseGraphQLServer","correct":"import { ParseGraphQLServer } from 'parse-server/lib/GraphQL/ParseGraphQLServer';"},{"note":"Configuration utility class, typically imported directly from the main package.","wrong":"import Config from 'parse-server/lib/Config';","symbol":"Config","correct":"import { Config } from 'parse-server';"}],"quickstart":{"code":"import express from 'express';\nimport { ParseServer } from 'parse-server';\nimport path from 'path';\n\nconst app = express();\nconst port = 1337; // Port for your Express app\n\n// Database connection string (e.g., MongoDB, PostgreSQL)\nconst databaseUri = process.env.DATABASE_URI ?? 'mongodb://localhost:27017/dev';\n\n// Initialize Parse Server\nconst parseServerApi = new ParseServer({\n  databaseURI: databaseUri,\n  cloud: path.join(__dirname, 'cloud/main.js'), // Path to your Cloud Code\n  appId: process.env.APP_ID ?? 'myAppId',\n  masterKey: process.env.MASTER_KEY ?? 'myMasterKey',\n  serverURL: process.env.SERVER_URL ?? `http://localhost:${port}/parse`, // Your Parse Server URL\n  liveQuery: {\n    classNames: ['Post', 'Comment'], // Classes to enable for Live Queries\n  },\n  // Ensure publicServerURL matches the client-facing URL for file uploads, etc.\n  publicServerURL: process.env.PUBLIC_SERVER_URL ?? `http://localhost:${port}/parse`,\n  verifyUserEmails: true,\n  emailAdapter: {\n    module: 'parse-server-simple-mailgun-adapter',\n    options: {\n      fromAddress: 'no-reply@example.com',\n      domain: process.env.MAILGUN_DOMAIN ?? 'example.com',\n      apiKey: process.env.MAILGUN_API_KEY ?? 'YOUR_MAILGUN_API_KEY',\n    },\n  },\n});\n\n// Mount the Parse API on the /parse URL prefix\napp.use('/parse', parseServerApi.app);\n\n// Basic Express route\napp.get('/', (req, res) => {\n  res.status(200).send('Parse Server is running.');\n});\n\n// Start the Express server\napp.listen(port, function() {\n  console.log(`Parse Server running on http://localhost:${port}`);\n  console.log('Make sure your database (e.g., MongoDB) is also running!');\n});\n\n// Example Cloud Code (./cloud/main.js):\n/*\nParse.Cloud.define('hello', (request) => {\n  return 'Hello from Cloud Code!';\n});\n*/","lang":"typescript","description":"Sets up a basic Parse Server instance with Express.js, connecting to a MongoDB database, enabling Cloud Code, Live Queries, and a basic email adapter for user verification."},"warnings":[{"fix":"Upgrade to `parse-server@9.8.0` or higher immediately. Review and adapt any client-side or cloud code logic that might have been exploiting previous unprotected field access.","message":"Multiple security vulnerabilities (GHSA-g4v2-qx3q-4p64, etc.) were addressed in versions 9.8.0 and subsequent alphas that fixed endpoints bypassing `_Session` and `_User` `protectedFields`. This may change behavior for applications that inadvertently relied on these bypasses.","severity":"breaking","affected_versions":">=9.8.0"},{"fix":"Ensure your Node.js environment strictly adheres to the `engines.node` specification in `package.json`. Use a tool like `nvm` to manage and switch Node.js versions as needed.","message":"Node.js engine requirements are very specific and frequently updated. Version 9.8.0 requires Node.js `^20.19.0`, `^22.12.0`, or `^24.11.0`. Running on unsupported Node.js versions may lead to unexpected behavior or failures.","severity":"breaking","affected_versions":">=9.0.0"},{"fix":"Only use the `masterKey` in secure server-side environments (e.g., Cloud Code, administrative scripts). Never include it in frontend applications or expose it via APIs. Implement granular ACLs/CLPs for client operations.","message":"The `masterKey` provides unrestricted access and bypasses all ACLs/CLPs. It should be used with extreme caution and never exposed to client-side code. Misuse can lead to severe security breaches.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Implement a deployment strategy that restarts the Parse Server process after Cloud Code changes. For development, consider using `nodemon` or similar tools for automatic restarts on file changes.","message":"Cloud Code is JavaScript/TypeScript code that runs on the Parse Server. Changes made to Cloud Code are not automatically reloaded in production environments without restarting the Parse Server instance. This can lead to stale logic.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Regularly review your authentication provider configurations (e.g., Facebook, Google, Apple) and update them according to the latest Parse Server and provider-specific documentation. Keep your `parse-server` package updated.","message":"Older authentication methods or social login providers might become deprecated or require updated configurations as third-party APIs evolve. Always check the Parse Server documentation for the latest integration guides.","severity":"deprecated","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-04-19T00:00:00.000Z","next_check":"2026-07-18T00:00:00.000Z","problems":[{"fix":"Ensure MongoDB is running and accessible from the Parse Server host. Verify the `databaseURI` in your Parse Server configuration (e.g., `mongodb://localhost:27017/yourdbname`).","cause":"The MongoDB database server is not running or is not accessible at the specified URI.","error":"MongoNetworkError: failed to connect to server [localhost:27017] on first connect"},{"fix":"Double-check that the `appId` value in your Parse Server configuration (e.g., `new ParseServer({ appId: 'YOUR_APP_ID' })`) is identical to the one your Parse SDK client uses to initialize.","cause":"The `appId` configured in Parse Server does not match the `appId` used by your Parse SDK client.","error":"Parse initialization failed: Invalid application id."},{"fix":"Verify that your Cloud Code file (e.g., `cloud/main.js`) contains `Parse.Cloud.define('myCloudFunction', ...)` and that the `cloud` option in your Parse Server configuration points to the correct path.","cause":"The specified Cloud Code function is not defined, or the Cloud Code file was not loaded correctly by Parse Server.","error":"Error: Could not find Parse.Cloud.define for function 'myCloudFunction'"},{"fix":"Ensure `parseServerApi.app` is accessed only after `new ParseServer` has completed its initialization. Confirm all required configuration options (e.g., `appId`, `masterKey`, `databaseURI`) are provided.","cause":"This usually indicates that `new ParseServer(...)` was not properly instantiated or its `app` property is being accessed before it's ready.","error":"TypeError: Cannot read properties of undefined (reading 'app')"}],"ecosystem":"npm"}