Parse Server is an open source application written on node.js programming language. The parse application is used as the Backend As A Service (BAAS) platform. It is easy-to-use, flexible and scalable backend for the mobile application.
Parse dashboard is built by the parse developers. It is an front-end web interface for managing backend parse server. You can add and manage multiple parse server from single dashboard.
This tutorial will help you to install and configure parse server and parse dashboard applications on Debian system.
Prerequisites
- Running Debian 10 instance with shell access
- Login as sudo privileged account
Step 1 – Install Node.js
Parser server and Parse dashboard both application can be run on any server with Node.js enabled. Firstly, you need to install Node.js on Debian system. To configure the package repository, run:
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
Then execute the following commands to install Node.js on your system.
sudo apt install -y nodejs
You also need to install yarn package manager on your system to install and manage node modules. To install Yarn package manager, type:
npm install -g yarn
Step 2 – Install MongoDB Server
The Debian 10 systems contains Mongodb packages under the default repositories. You can simply update apt cache and install Mongodb database server packages by running following commands:
sudo apt update sudo apt install mongodb-server
Step 3 – Setup Parse Server
Your are ready for the installation of Parse server on your Debian system. The parse server application are available as Nodejs module. You can install Parse server module using yarn package manager. To install it, execute:
yarn global add parse-server
The will add parse server module globally on system.
After that, create a configuration file for your Parse server. Where you can define attributes of the parse server. Create a configuration file and edit in your favorite text editor:
nano config.json
Then, add the following content to the file:
{ "appName": "MyApp1", "databaseURI": "mongodb://localhost:27017/parsedb", "appId": "FSD9FK3329SKJFD99SKDJ", "masterKey": "KJK9AksiHU7lsujKSDJF49jGnTYKD", "serverURL": "https://localhost:1337/parse", "publicServerURL": "https://0.0.0.0:1337/parse", "port": 1337 }
Configuration details:
Save and close the file. Next start the parse server in background and with nohup command.
nohup parse-server config.json &
Your parse server is up and running now on port 1337.
Step 4 – Setup Parse Dashboard
Parse dashboard is the web interface for accessing the Parse server on web interface. Which is also available as node module and can be installed using yarn package manager. To install parse-dashboard, run:
yarn global add parse-dashboard
Next, Create Parse dashboard configuration file. Create a new file and edit file in a text editor:
nano parse-darshboard-config.json
And add the following content:
{ "apps": [ { "serverURL": "http://67.205.146.114:1337/parse", "appId": "FSD9FK3329SKJFD99SKDJ", "masterKey": "KJK9AksiHU7lsujKSDJF49jGnTYKD", "allowInsecureHTTP": "true", "appName": "MyApp1" } ], "users": [ { "user":"admin", "pass":"password" } ], "iconsFolder": "icons" }
You can add multiple parse servers application in single configuration file. Make sure to use same appID and masterKey as you defined in your parse server.
Also add user and password for the authentication. Which is used to login to Parse dashboard.
Save and close configuration file. Then, execute the following command to start parse dashboard.
nohup parse-dashboard --dev --config parse-darshboard-config.json &
The above command will start your parse server on port 4040.
Step 5 – Adjust Firewall Ports
The systems have enabled firewalld, need to allow access on ports running Parse server. We are using the port 1337 for the parse server and 4040 for the dashboard. Execute the following commands to allow access for public users for Parse server. To open port type:
sudo firewall-cmd --permanent --zone=public --add-port=1337/tcp sudo firewall-cmd --permanent --zone=public --add-port=4040/tcp
Then, apply the changes by running command:
firewall-cmd --reload
- Read this: What is FirewallD?
Step 6 – Test Setup
Now, Access the parse dashboard web interface by accessing your server on port 4040. Login to the dashboard with the username and password defined in parse dashboard configuration file (parse-darshboard-config.json).
After successful login you will be redirected the dashboard.
Here you can switch between multiple parse server configured with your parse dashboard.
Conclusion
In conclusion, this tutorial helped you with the installation of parse server on Debian system. Also configure parse dashboard and connect with Parse server.
1 Comment
it’s not a good idea on production to put parse and dashboard to outside. Better use apache or nginx to rewrite the links like /parse and /dashboard to localhost