Creating a repository for easy LiveQuery testing

in #utopian-io7 years ago

image.png

Lately I have been working freelance for a project that was using parse-server in its back end and was tasked to implement the LiveQuery feature that allows users to receive instant updates of the mongodb database.

Although my work didn't involve working on the front end, I needed a way to test what I was doing and found nothing around, so I created this repository with the code you need to get started. Indeed, the Parse documentation is very sParse and even if the code is quite short it took me a while to figure it out playing with the different parameters.

These commits created the current test version.

Once your parse-server is setup you just need to change the four parameters at the begining of the main.js file:

  • AppId
  • MasterKey
  • Server Url
  • Name of the collection using LiveQuery

Then, run this by doing:

npm install
node main.js

You should see connection opened pretty much right away if the parameters are right.
You can then send cURL commands to test your parse-server to create objects of the Collection you specified. You should then see : object created.appear in the terminal.

That will mean you re all setup.

Hope this will help! I really wished I found this when I started working on this project.



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

Thank you for the contribution. It has been approved. When you write another post presenting additional work, please add explicitly which commits (range) and PRs are connected to the work. Giving a link to a master branch commit history is not much help and it will not reflect the following code additions. Sorry for writing it here but I saw that you were asked to do that with your other project SteemPlus.

You can contact us on Discord.
[utopian-moderator]

All the commits were posted today,I precised on my post that I just created the repository so I think it does make sense to put the list of the commits here. I'll post the individual commits next time though ;)
EDIT: Wow, I ve said commit a lot.

This is a very good job, and can help a lot @stoodkev

Glad you found it useful!

Yes friends, because I read your post, and it helps for many people.
Good luck always

Hey @stoodkev I am @utopian-io. I have just upvoted you!

Achievements

  • Seems like you contribute quite often. AMAZING!

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!

mooncryption-utopian-witness-gif

Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x

Coin Marketplace

STEEM 0.16
TRX 0.13
JST 0.027
BTC 58503.45
ETH 2594.59
USDT 1.00
SBD 2.45