Parse.com REST API Client for Node.js

0.3.8 · abandoned · verified Tue Apr 21

This `node-parse-api` library serves as a Node.js client for the Parse.com REST API, offering functionalities like data insertion, user management (login, registration), file uploads, and querying objects. At version 0.3.8, it reflects an early period of Node.js and the Parse.com platform. A critical aspect of this package is its tight coupling to the original Parse.com hosted service, which was officially shut down in January 2017. Consequently, while the package itself is available, its primary utility for connecting to `api.parse.com` is obsolete. There is no indication of active development or a release cadence, and it is likely abandoned, primarily existing as historical reference for developers who might have used the original Parse.com platform. Its design predates modern JavaScript module systems, relying exclusively on CommonJS.

Common errors

Warnings

Install

Imports

Quickstart

Initializes the Parse API client with an App ID and Master Key and demonstrates inserting a new object into a Parse class. Note: This library targets the now-defunct Parse.com service.

const { Parse } = require('node-parse-api');

const APP_ID = process.env.PARSE_APP_ID ?? '';
const MASTER_KEY = process.env.PARSE_MASTER_KEY ?? '';

// Ensure environment variables are set or replace with actual values (not recommended for production)
if (!APP_ID || !MASTER_KEY) {
  console.error('PARSE_APP_ID and PARSE_MASTER_KEY environment variables must be set.');
  process.exit(1);
}

const app = new Parse(APP_ID, MASTER_KEY);

// Insert an object into a 'Foo' class
app.insert('Foo', { foo: 'bar', timestamp: new Date() }, function (err, response) {
  if (err) {
    console.error('Error inserting object:', err);
    return;
  }
  console.log('Successfully inserted object:', response);
  // A real application would typically have more operations here.
  // Given Parse.com is shut down, this example is primarily illustrative.
});

view raw JSON →