February 12, 2017 Uncategorized

Local Parse Server + Ionic2 tutorial

 

In this video we create a mobile application with Parse Server installed locally in our computer and with Ionic2.

Parse Server

Parse Server is a server that run on NodeJS, over Express server, and it stores the information in a MongoDB database. By default, Parse Server provides us many features that would be costly to implement by ourselves. Some of these features are users and roles management, realtime notifications, files uploads and management on the server, geo queries, push notifications, etc. Parse Server also provides us a dashboard that allows us to develop our APIs (classes) very easy.

These are the steps that we have to follow to have our Parse Server running:

 

Once we have cloned the repository, we have the server, that is the file index.js. We are going to include some lines of code to this file in order to setup the dashboard. But before this, we have to install the package parse-dashboard:

 

Next, we are going to update index.js and we have to add the lines of code that I have highlighted with yellow color:

Once our server is finished, we can access the dashboard and start designing our classes.

Ionic2

We have to create an Ionic2 app, and next we have to create a provider that will get the information from our server. This is the code of our provider:

 

In the constructor of our page we have to call to our provider to get the information from the server:

 

Finally, we have to update our template to display the information that we got through the provider:

 

 

    Leave a Reply

    Your email address will not be published. Required fields are marked *

    Back to top