Get unlimited public & private packages + team-based management with npm Teams.Learn more »


0.1.1 • Public • Published


NPM Ember Observer Score

An Ember addon to interact with Parse datastore.
This supports Ember API v2.x and above (built using Ember v2.8)
Also we have full support for custom Parse URLs including back4app or sashido or your very own Parse installation on your own DO/AWS/GC/Azure box.



Install the addon

ember install ember-parse-lib

Install parse@1.9.2 via Bower as frontend dependency

bower install parse@^1.9.2

In your config/environment.js add this to your ENV.APP

var ENV = {
    APP: {
      // Here you can pass flags/options to your application instance
      // when it is created
      Parse: {
        url: '',
        appId: 'G9h2udnUz5z2oVT7OAFNNSkcQKkORl6Sb2bePZ7B',
        jsApiId: 'MaVeTMJ0uubSRBADREgXy9UY98uPcxDRMEurTiyf'

Saving Data

Create a model of your required class

ember g model fruit

You can make the model whichever way you want to, just like any simple Ember model

import DS from 'ember-data';
export default DS.Model.extend({
  color: DS.attr('string'),
  taste: DS.attr('string')

The modelName (which is just the file name of the model, all lowercase and dashified) of the model is used as class name in Parse.

If you want to have a custom class name (for eg, to have a capitalized name), reopen the class and add parseClass

import DS from 'ember-data';
export default DS.Model.extend({
  color: DS.attr('string'),
  taste: DS.attr('string')
  parseClass: 'Fruit'

Save the data as you'd do with any Ember model'fruit', {
  color: 'red',
  taste: 'sour'
}).save().then(function(savedObj) {
  console.log('Saved object with key ' +;

Fetching Data

To find all records in a class'fruits').then(function (fruits) {
    //Eat them fruits here ;)

To find a particular entity by given id'fruits', '2D7dKQbCGZ').then(function(fruit) {

Here we are fetching fruit with id = 2D7dKQbCGZ.


ember-parse-lib supports query constraints too. For example to find fruits in ascending order of their colour -'fruits', {ascending: "colour"}).then(function (fruits) {

And to find a particular username'parseuser', {equalTo: {'username': username}}).then(function(users) {

An example structure of your query filter object is this -

        equalTo: {
          city: "Delhi",
          country: "India"
        notEqualTo: {
          gender: "male"
        lessThan: {
          age: 40,
        lessThanOrEqualTo: {
          hasCars: 4
        greaterThan: {
          age: 20
        greaterThanOrEqualTo: {
          kids: 1
        ascending : ["age", "name"],
        descending: "city"

This would find out people in Delhi, India, who are not males, between the age of 20 and 40, having less than 4 cars and more than 1 kid. It'll show up in ascending order of age, and within that, in order of name. Ties will be broken in descending order of city.

Signing up user

Sign up a user with username and password like this -

      let user ="parseuser");
      user.username = "username";
      user.password = "password";
      user.signUp().then((obj) => {
        console.log("Signed up user, and id of new user = " +;

Logging in a user

Log in a user with username and password, or existing user object

      let user ="parseuser");
      user.username = username;
      user.password = password;
      user.logIn().then((obj) => {
        console.log("Parse object of user = " + obj);
      obj.set("moredata", "somevalue");;


Please read up on Ember's extending guidelines to get an idea of how Ember addons are structured.


Running Tests

NOTE: I have not actually written any tests and writing tests for everything is something that needs to be done and is on high priority

  • npm test (Runs ember try:each to test your addon against multiple Ember versions)
  • ember test
  • ember test --server


  • ember build

For more information on using ember-cli, visit



npm i ember-parse-lib

DownloadsWeekly Downloads






Last publish


  • avatar