Could the js api sdk be used on the server side as well?

Hello,

Just would like to know: Regarding the CRUD (including query with various conditions) operations for the classes, is it the same api for both client and server?
From the parse-server guide below, does not find info related.

Also found the cloud function doc, the usage of Parse.Query, but which sdk should be imported? Is it just the js sdk?

Could anyone could please help? Thanks a lot.

If you want to use js sdk in cloud code you dont have to do anything. JS sdk is already included for the cloud code and node environment. But ıf you want to use it on other servers, you can use parse/node.
Just install parse with npm i parse and import parse/node on your js file like this:
const Parse = require('parse/node');

See this: JavaScript Developers Guide | Parse

1 Like

@uzaysan Thanks for help. So does this means that it is easy to move some logic from client side to sever side if needed when using js sdk, since the code should be almost the same? This is a big plus for parse server :+1:

Well that depends. But in general it should be easier since language is same.

1 Like