Parse Image + Parse httpRequest replacements — migrating from Parse Cloud Code to Parse Server on Node (Heroku / AWS / DO) - parse-platform

I found that when using the parse-node package, you can no longer use Parse.Cloud.httpRequest. I also know that Parse's Image object won't be available.
So far, I've been able to replace some Parse promises with native ones and use axios to make network requests.
However, I'm relatively new to Node, so I'm curious as to what are the most direct replacements for these, and how do I use them?

You should still be able to use Parse.Cloud.httpRequest. But axios is a great library and it's a great idea to start using it if you want to learn nodejs. When it comes to the parse-image it has to be replaced. There is a library which claims 100% compatibilty, check it out here.

Related

Byte-range support in gin-gonic

Im trying to get byte-range support working in the gin-gonic framework for Golang, or it's just basically fetching media in chunks/streaming.
I've been around googling a whole lot, and found some things that don't really fit my case.
I've been trying to use
c.File(filePath)
I don't have a filePath only a reader because I interact with google cloud storage.
I have also tried with
c.DataFromReader(200, rc.Size(), "audio/mpeg", rc, extraHeaders)
but im not sure that it's what I was really looking for and does not work anyway.
How does one do this in the gin-gonic framework?

How to use QUploader (Quasar-Framework) with websockets?

QUploader is documented here and here is its code.
I am trying to get QUploader (Quasar-framework version 0.14.7) working uploading images to a featherjs 'service' on external server, basically following along this example.
How do I use QUploader with websockets?
I tried to make feathersjs upload work without Quasar, that didn't work, but I am able to make Quasar work with a normal Express multer upload.
You just use add :upload-factory="uploadFile" to the q-uploader component.
The method goes like this: uploadFile(file, updateProgress)
And you can do whatever with the file what you want, and you can calculate the progress and call updateProgress(calculatedProgress) with calculatedProgress going from 0.0 to 1.0.
(Just make sure you have feathers-client wokring through websockets, then use Axios or something else on the client to upload it through websockets)
It's all explained here

Streaming json in nativescript

has anyone used the streaming json in nativescript? I found this http://oboejs.com/why but it seems not to work. I'm using nativescript 1.6, any suggestion would be appreciated really much. Thank you.
There is no library to my knowledge currently built for NativeScript that allows streaming JSON. Just for clarification sake you can easily pull JSON from a server and parse it using the built in fetch/http api's, right now -- but their is no way to have it start parsing the json as it downloads in chunks built in.
You can attempt to modify the npm node module to build for NativeScript.
Or thinking outside the box a bit; you can also use the web based version of that module inside the nativescript-webworkers and have it pull and process your JSON and communicate the json messages back to the NS environment. The WebWorkers module actually wraps the native platform's web browser module so it can run all browser based JS code.
Disclaimer: I'm the author of the open source NativeScript-WebWorkers.

How to include reactivex dependency in Cloud Code

I would like to use a 3rd party library in my cloude code. It is located here https://github.com/Reactive-Extensions/RxJS
I have downloaded the .js file and put it in my cloud/ directory and tried to import it using
var rxModule = require('cloud/rx.js');
I have had success with other libraries but for this one it just throws
Uncaught Error: This operation is not supported
when i call parse deploy
Is there another way I can include a 3rd party lib?
RX can be installed using NPM:
$ npm install rx
It can then be used as follows:
var rxModule = require('rx');
There are great instructions and samples at https://www.npmjs.com/package/rx
#Darussian, I do not know if this is still relevant but I wanted to the same thing.
From what I understand, Rx won't work in Parse Cloud Code because setTimeout() and setInterval() are not defined, and they are needed for Rx.Schedulers to work.
So, what I ended up doing was trying with other similar libraries. The one I got to work was Kefir.JS. It works similar to Rx and has some of the same methods. You may be disconcerted at first but should be able to transfer any Rx code you wanted to build to Kefir.
One thing that helped me a lot was using scan() combined with last() to emulate Rx reduce() method (which is not on Kefir by default).

Apiary: Export API as JSON, to generate client code

We all know that apiary rocks (or not.. I think it does), and I was wondering what would it take to take it a step further allow users to export a JSON description of the API? (So developers can script client code generation)
This should help:
http://ttezel.github.io/blog/2013/02/23/stop-writing-rest-api-clients/
There are two directions you can explore:
you can use Alpaca to generate client SDKs. Alpaca accepts API Blueprint as one of it's input formats
for more flexibility, you can use Snowcrash to parse API Blueprint into JSON - and roll your own code generator.
There are more tools around API Blueprint available at http://apiblueprint.org/

Resources