parse-community / parse-server Goto Github PK
View Code? Open in Web Editor NEWParse Server for Node.js / Express
Home Page: https://parseplatform.org
License: Apache License 2.0
Parse Server for Node.js / Express
Home Page: https://parseplatform.org
License: Apache License 2.0
In the past, you guys proudly announced that the core API server was rewritten in Go and I was really thrilled to see how you did it when I first heard the news. But now we have source code in Node.js out of nowhere..
Are you guys rewriting all the source code again?
Using Parse and ParseUI with parse-server (production) gives me a login error. I have migrated all the data and I set the serverURL on app delegate.
It was working on Parse Hosted.
The HTTP App Transport is correctly configured to enable non-HTTPS requests.
Logs:
2016-01-29 17:33:03.604 HispaLearn[74822:3733505] -canOpenURL: failed for URL: "fbauth2:/" - error: "(null)"
2016-01-29 17:33:03.611 HispaLearn[74822:3733505] -canOpenURL: failed for URL: "fbauth2:/" - error: "(null)"
2016-01-29 17:33:47.800 HispaLearn[74822:3733505] -canOpenURL: failed for URL: "fbauth2:/" - error: "(null)"
2016-01-29 17:33:47.813 HispaLearn[74822:3733505] -canOpenURL: failed for URL: "fbauth2:/" - error: "(null)"
2016-01-29 17:33:57.914 HispaLearn[74822:3733505] -canOpenURL: failed for URL: "fbauth2:/" - error: "(null)"
2016-01-29 17:33:57.927 HispaLearn[74822:3733505] -canOpenURL: failed for URL: "fbauth2:/" - error: "(null)"
Hi,
I created a simple docker image for parse-server.
https://hub.docker.com/r/instainer/parse-server
It quickly runs parse-server on express inside docker container.
You can test it from here;
http://instainer.com/?deploy=instainer/parse-server
What will happen to file migration? I can't really find instructions on how to transfer/migrate over files to your own bucket.
According to the migration guide, schema API is not supported. So what's the best way to create the schema for data? I guess I have to create the schema directly in mongodb. Is my understanding correct?
When I am trying to login using the local parse-server and migrated mongoDB (on MongoLab), I am getting the following:
{"code":111,"error":"schema mismatch for _Session.createdWith; expected map but got object"}
please advice.
I have everything setup correctly "so I say".
Any ideas?
What would be the strategy for storing files as Parse will not be hosting files anymore? Would this be a blessing in disguise? Can we now be able to host files larger than the 10mb limit in ParseFile if we implemented ParseFile ourselves?
Are there any chances that admin dashboard where all data, acl, classes access etc could be managed?
A lot of people chose Parse because they had no experience with developing backends. The current migration guide is a great start, but much of it is just an executive summary for people who already know what they're doing (particularly the section "Deploying to Heroku/MongoLab").
What's really needed is a true beginner's guide and best practices that takes you through all the steps of setting up a Heroku account correctly, installing node, setting up mongoDB, migrating everything over, making sure everything's working, etc. Ideally, you'd be able to follow the steps to do a complete migration of a standard Parse app with little to no experience in the platform/languages. (Sort of like the original Parse tutorials for developing your first iOS app with Parse integration.)
Otherwise, a lot of developers will be left out in the cold here, either abandoning their apps completely, spending weeks/months learning new platforms/languages, or spending thousands hiring someone else to do it for them.
One part I'm missing beside the push support is how to migrate jobs over to a hosted solution. Can someone point me to the documentation / source for this if I missed it or are there already ideas / suggestions how that should be done?
I've got my server up and running with Heroku however upon authenticating my users I'm getting:
{
"code": 1,
"message": "Internal server error."
}
Also showing this in the Heroku Logs
Uncaught internal server error. bad obj: undefined undefined
I'm unable to locate any of the logs for node or parse though. Is there a location that they would be? I know traditionally this means that it's Parse's bug but since I've got it hosted I need to figure out what's going on.
Thanks!
I think the SDKs should be updated with the capability to pin our server side certificates (presumably self signed), and thus it verifying the authenticity of the server upon connecting, while making it less of a need for some use cases to go without acquiring a signed certificate, at least during the transition.
Optionally the server could integrate with lets encrypt, that could be a viable alternative.
Hi,
I have the following error on the server side when I try to save a file.
My files are 300kb top.
Uncaught internal server error. { [Error: request entity too large]
expected: 285569,
length: 285569,
limit: 102400,
status: 413,
statusCode: 413,
message: 'request entity too large',
type: 'entity.too.large' } Error: request entity too large
at makeError (/Users/W/Sites/Tracks NZ/Backend/node_modules/parse-server/node_modules/raw-body/index.js:154:15)
at readStream (/Users/W/Sites/Tracks NZ/Backend/node_modules/parse-server/node_modules/raw-body/index.js:188:15)
at getRawBody (/Users/W/Sites/Tracks NZ/Backend/node_modules/parse-server/node_modules/raw-body/index.js:95:12)
at read (/Users/W/Sites/Tracks NZ/Backend/node_modules/parse-server/node_modules/body-parser/lib/read.js:64:3)
at Object.rawParser [as handle] (/Users/W/Sites/Tracks NZ/Backend/node_modules/parse-server/node_modules/body-parser/lib/types/raw.js:73:5)
at next_layer (/Users/W/Sites/Tracks NZ/Backend/node_modules/parse-server/node_modules/express/lib/router/route.js:103:13)
at Route.dispatch (/Users/W/Sites/Tracks NZ/Backend/node_modules/parse-server/node_modules/express/lib/router/route.js:107:5)
at /Users/W/Sites/Tracks NZ/Backend/node_modules/parse-server/node_modules/express/lib/router/index.js:205:24
at param (/Users/W/Sites/Tracks NZ/Backend/node_modules/parse-server/node_modules/express/lib/router/index.js:286:14)
at param (/Users/W/Sites/Tracks NZ/Backend/node_modules/parse-server/node_modules/express/lib/router/index.js:298:16)
I believe it's a middleware issue, I have tried couple of things in my index.js like
var bodyParser = require('body-parser');
api.use(bodyParser.json({limit: '50mb'}));
api.use(bodyParser.urlencoded({limit: '50mb', extended: true}));
api.use(bodyParser.raw({limit: '50mb'}));
Unfortunately no success.
I did jump into the code and found a temporary fix in files.js
L:83
router.post('/files/:filename',
bodyParser.raw({type: '*/*', limit: '5mb'}),
middlewares.handleParseHeaders,
processCreate);
Any idea how to override this limit in a clean way?
Thanks
Parse notifications, dashboard etc. - when could it potentialy become available in this open source? I know it matters how active the community will be, but I have no clue how things work. Is this matter of weeks, few months or a year? Just an estimate, pleeease. It would be very helpful.
var ParseCloud = require('parse-cloud-express');
var ParseServer = require('parse-server').ParseServer;
var Parse = ParseCloud.Parse;
if (!process.env.DATABASE_URI) {
console.log('DATABASE_URI not specified, falling back to localhost.');
}
var api = new ParseServer({
databaseURI: process.env.DATABASE_URI || 'mongodb://localhost:27017/dev',
cloud: process.env.CLOUD_CODE_MAIN || __dirname + 'cloud/main.js',
appId: 'appid',
masterKey: 'masterkey',
javascriptKey: 'javascriptkey'
});
// Client-keys like the javascript key or the .NET key are not necessary with parse-server
// If you wish you require them, you can set them as options in the initialization above:
// javascriptKey, restAPIKey, dotNetKey, clientKey
Parse.initialize('apikey', 'javascriptkey');
Parse.serverURL = 'http://localhost:3030/parse';
const pretty = new PrettyError();
const app = express();
// Serve the Parse API on the /parse URL prefix
var mountPath = process.env.PARSE_MOUNT || '/parse';
app.use(mountPath, api);
const server = new http.Server(app);
When I try to run this in my express app, I'm getting a proxy error. I am very new to express, could someone please help?
Now with the soon to come (1 year) retirement of Parse, what will this mean for SDK's in general? Will you continue to have these available and up-to-date? Will the SDK's and Parse-Server be further developed overtime, or does "Retirement" mean what it means, retirement / complete stop of further development?
I'm thinking of adopting Google App Engine for the backend.
Im therefore wondering if I could use the Parse server code so I don't have to rewrite my app.
The blog post doesnt detail on why you are closing patse fown!!
What about creating .log files? This is needed to understand if the requests are reaching the server, returning 200, etc...
Will Parse team going to actively maintain and develop Parse Server and Parse SDKs after 2017? Please let us know the details. This is very important for us to make decision, whether we should host Parse Server our-self or to change to another service.
Will you the web dashboard be open sourced as well? Eventually? This would be super nice and handy!
MongoDB is a great NoSQL database choice, but I had a few concerns:
I want to use either Google Datastore or Amazon DynamoDB. Both are good NoSQL database choices.
Google: https://cloud.google.com/datastore/
Amazon: https://aws.amazon.com/dynamodb/details/
I think it would be nice to be able to interface with alternative NoSQL databases other than MongoDB.
One of my favorite features of Parse is Config. Well, we definitely can create a custom method, that returns a JSON and etc., but would be amazing to have it working without the need to change code in the Client side.
What are the reasons that cause Config not to be supported currently? Maybe answering this question will give some direction on how to implement it?
Ideally it'd be possible to just integrate Passport which offers Strategies for nearly every Provider you can think of.
Hello Parse-Team ;(
I was in technical mourning the whole day in my bed and since its 10pm here I thought I should stop wining. Thaanks first of that you guys decided to still support the open source stuff. Could have been worst...
Well to my question: Do I need for each app from now on a single parse-server instance? I have apps that depend on parse but have not that much of traction to get their own server. I'm I right that I need multple instances??
PS: Couldn't you post it on a monday? Mondays sucks anyway..
Hi,
I do have a question on migrating my old applications to own hosted AWS.
I'm really pretty new and inexperience in doing hosting server. I wish to know that what I should do if I want to host everything in AWS, including the MongoDB. Is that means I need to create a EC2 in AWS and install MongoDB into it, and port everything in parse server into the BeanStalk? I want to know the path of doing that so that I won't take the wrong road and we are in a hurry of development time now.
Besides that, i also quite concern on the cost of the AWS, if free tier in Parse is equivalent to how much in AWS(i believe this is hard to answer so just ignore it if you don't want to answer).
Thank you
Hi, I would like to know if we host on our own server. Does all the limitations that Parse mentioned still apply?
For example:
Would it be possible for Parse team to Opeansource WebUI component ?
Or publish concept diagram on how it should be working so community can build one ?
It is very difficult to manage / edit data ( which was one of the core competency of Parse ) and to create authorization over data.
From the Parse Server guide-
When using MongoDB with your Parse app, there are some differences with the hosted Parse database:
You need to manage your indexes yourself. Hosted Parse automatically adds indexes based on the incoming query stream.
You need to size up your database as your data grows.
I don't have any experience with MongoDB, so I would like to know if the requirement for manual management of the db will be hard work or could the Parse Server codes be updated to manage the MongoDB automatically? I'm wondering if this is a thing that can be smoothed out.
I wish you could add a Heroku button to this project so that with a single click I could create my own parse.com instance on an heroku app and switch my apps to it with just changing the API url in my app somehow.
Hello there โ
I originally opened this on parse-server-example, but I have since closed that issue and opened this one up since this seems like the proper place for this issue.
I believe I've set this up properly...
When I go to perform a query on my database, I search { "where : { "showId" : #### } }.
No matter what my ##### is, I always receive every object for that class.
I'm using the example .js file for the server itself with my keys placed in.
I'm just trying a CURL at the moment:
curl -X GET \
-H "X-Parse-Application-Id: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
-H "X-Parse-Master-Key: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
-G \
--data-urlencode 'where={"showId":"35540"}, limit=1' \
http://127.0.0.1:1337/parse/classes/TvShow
Without fail, the results to this query will always be the current contents of the TvShow class. Currently there are only two objects in there as I try to figure this out.
I believe I've set up the indexes in Mongo properly. I added an index for the showId field as text.
This is the return:
{"results":[{"objectId":"JD2F4egyt3","showId":"35540"},{"objectId":"xjlkafUShl", "showId":"35541"}]}
This also occurs in REST API.
Hello everyone! I am unable to save an object in cloud code . I arrive in the method, but every time I save is return "code : 141 - unauthorized " . Are there any special permission to cloud code in parse server?
my code:
Parse.Cloud.define("invite", function(request, response) {
var invite= new Parse.Object("Invite");
invite.set("phone", request.params.phonenumber);
invite.save(null, {
success: function(newInvite) {
response.success("SMS sent!");
},
error: function(user, error) {
response.error("Error: " + error.code + " " + error.message);
}
});
});
We had some Cloud Code like this in Parse:
Parse.Cloud.define('deleteUser', function (request, response) {`
var User = Parse.Object.extend('_User');
var query = new Parse.Query(User);
query.get(request.params.user).then(function (result) {
result.destroy();
}).then(function (results) {
response.success('User deleted');
}, function (error) {
response.error(error);
})
});
It worked fine in Cloud Code however, it seems to be broken in parse-server, on debugging it looks like Parse.Cloud.useMasterKey();
is not being applied to the options of all ParseObject calls. This is required because the ACL prevents anyone creating additional items in the table.
I'm aware that this it not a big security risk but I just don't want my DB to get spammed with data that I don't need.
Is there a guide for a blank new project where it shows how I can setup the backend settings like new user email templates, collaborators, etc. like how the webui did for Parse Backend? or would it be better to hold off and hope Parse WebUI comes out sooner than later?
I know the migration guide is there, but that guide is for existing projects. It doesn't tell me how to make new Keys that I would need like File Key, Master Key, Client Key, JavaScript Key, etc,
Any help would be appreciated.
Super sad Parse is closing down. Got a question do we need to have separate parse servers / mongoDB's for each app? How do we migrate multiple Parse hosted apps? Thanks!
Hi, we are developing Xamarin app using Parse. I know very little about managing servers and I'd like to decide wheter it's a good idea to go this way. I'd like to make a few things clear to me.
Thanks for any kinds of answers :)
Do we have any webhook migration instruction?
based on this example app: https://github.com/ParsePlatform/CloudCode-Express
should I just change the 'https://api.parse.com/1/hooks/triggers' to my heroku app url + /hooks/triggers?
Thanks,
I've written parse-anywhere a while ago in order to be able to run cloud code locally.
Recently, I've deployed it through Google App Engine managed VM's in production.
The goal of parse-anywhere was to run the exact same code as you would on parse but locally, before deploying.
All the parse provided modules were re-written, or re-wrapped in order to have 100% compatibility.
Integrating it would be a nice to have for the community and avoid any code rewrite.
Was taking a look at this: #4
The reason tonic uses node 0.12 is because the engines variable isn't set in parse-server's package.json. If you set engines: { node: ">= 4" } then Tonic will appropriately choose node 4 and the syntax error won't happen. Given that the package expects ES6 to be natively present this seems like the right engine. An alternative is to have a pre-publish step that babel-ifies the code so that it can work on any node.
Thanks,
Francisco
It would be great to have a dockerized solution, a standard docker-compose file with the necessary containers and services (Node/Express API, MongoDB, PUSH, etc) and provide some examples of deployment for several clouds. Examples:
The goal should be getting an open platform easy to deploy, scale and manage.
Thoughts?
i.e. will the methods described here: https://parse.com/docs/js/guide#objects still work or do we need REST API calls?
Any plans to allow login with Twitter again?
In the migration guide, it says to set the environment variables using the appId, master key and file key. What is the file key? I don't see it in "Security & Keys" in my app's settings.
It's very sad that parse.com will terminate within one year. Some of our applications will be affected. I'm developing an application right now which is using parse.com as backend. Should I re-develop everything or I can just use parse-server in my own server with current source code?
Another question is regarding with push notification. A few of my applications are using Push Notification. Are you going to release the source code for this part in the future? Or we have to develop our own Push Notification system?
Thanks.
How long the Open-Source codes will be available for us?
Receiving the following error message when I tried spinning up a sample Express project and requiring parse-server.
This happens even if all I do is require('parse-server')
, or if I go ahead and follow the example in the README.md
See this test https://tonicdev.com/npm/parse-server
SyntaxError: /app/available_modules/1454024179000/parse-server/index.js:145 request(options, (error, response, body) => { ^^ Unexpected token =>
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.