Hi Guys,
I know we are all on the same boat as Parse lovers but especially I am now very devastated since I had zero knowledge about Node.js and MongoDB. I spent a couple of days studying a bit about them and now got some basic concepts. I have been trying to set up a Parse server and MongoDB locally first. I have installed them correctly (I believe) but when I run "npm start" to start Parse Server, I got the following messages. FYI I see mongod and mongo running without an issue.
DATABASE_URI not specified, falling back to localhost.
parse-server-example running on port 1337.
In browser, if I go to "localhost:1337/parse", it gives me the following error. (localhost:1337 is fine)
{"error":"unauthorized"}
And this is my API setup. I did provide databaseURI but don't know why it is complaining that it is not specified.
var api = new ParseServer({
databaseURI: 'mongodb://localhost:27017/dev',
appId: 'xxx',
masterKey: 'yyy'
});
Not sure what I am missing or set up incorrectly. Please advice me.
Hi,
The message you have {"error":"unauthorized"} is not an error when you check your server directly with your web browser by typing localhost:1337/parse. This URL is not meant to be used in a browser (without keys).
In my opinion, your configuration is good.
Did you try to send a request to your Parse server from your code (with the keys) and check the result from here ? If you still get the error message {"error":"unauthorized"}, it's because you didn't set up your keys correctly
If you've set a username and password for a separate parse user for the parse database you'll also need to set that in the databaseURI
"databaseURI": "mongodb://parseuser:password@localhost:27017/parse",
Thanks guys..really really appreciate it! More questions here.
var port = process.env.PORT || 1337;
app.listen(port, function() {
console.log('parse-server-example running on port ' + port + '.');
});
DATABASE_URI not specified, falling back to localhost.
parse-server-example running on port 1337.
Hi,
Have you run the migration tool already?
Maybe try doing a few cURL requests to localhost
curl -X GET \
-H "X-Parse-Application-Id: YOUR_APP_ID" \
-H "X-Parse-Master-Key: YOUR_APP_MASTER_KEY" \
http://localhost:1337/parse/classes/_User
@conan311
Yes you should see that the server is running, when you run it... npm start. And you do, it's at the end of the message you posted.
If you have NO database, it will create one... but no, it will not automatically migrate from Parse, you have to do that through the UI on Parse.com, and you should not migrate to your localhost machine.
You're getting the 'falling back to localhost' message because you didn't set the DATABASE_URI environment variable, or pass in a connection string to the ParseServer initialization. Look at the guide for running on mongolab for an example.
After a few rounds of trials and failures, I finally got it working. Your answer did really help a lot to solve my curiosities. Due to my entry level knowledge to Nods.js & MongoDB, I had a few misunderstanding in how it works: (I know they sound dumb but just posting it to help any other newbies who would make similar mistakes in future)
mongod before running Parse Server.DATABASE_URI in `index.js'Everything is crystal clear now. Thanks heaps lads!!
p.s: Just curious how it is going in regards to the development of Dashboard.
@All,
I have successfully set up parse server locally but I am having problem while executing query. The URL formed by the parse helper is:
http://localhost:1137/parse/1/classes/_User?where=%7B%22rowid%22%3A67%7D&limit=1
I am getting response as "false" in _request(...) method of parseClient class.
But when i send a hardcoded url as:
http://localhost:1137/parse/classes/_User
i get all the users.
can you please help me why am i getting a false response when i request the 1st url?
thanks
I am having the same problem as @narendraojha.
How do we configure the parse url helper to omit the '/1/'
Any help is greatly appreciated.
@jspenc72, the url issue has already been fixed in New Parse PHP SDK. I was using old version of sdk and after update issue is fixed.
Hope it will help you.
I'm using the Java script sdk in nodejs. Do you know if it's fixed there?
On May 6, 2016, at 8:16 PM, Narendra Raj Ojha [email protected] wrote:
@jspenc72, the url issue has already been fixed in New Parse PHP SDK. I was using old version of sdk and after update issue is fixed.
Hope it will help you.—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
No, I don't have any idea about java script sdk.
Ok thank you
On May 9, 2016, at 1:19 AM, Narendra Raj Ojha [email protected] wrote:
No, I don't have any idea about java script sdk.
—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
Same issue. Any resolution?
this issue has been closed for a while. Please reopen an issue filling the issue template
No, the project ended up getting cancelled so I never found a solution.
On Oct 25, 2016, at 7:32 PM, Gregg Mojica [email protected] wrote:
Same issue. Any resolution?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
@All I managed to get thorough the unauthorized issue, but now if I try to get back results from any of my collections using curl, I get an empty response. Any ideas? Thanks!
curl -X GET \
-H "X-Parse-Application-Id: xxxx" \
-H "X-Parse-Master-Key: yyyy" \
http://localhost:1337/parse/classes/Zip
{"results":[]}%
If you have this error , it about this url "http://localhost:1337/parse" it use for api call with some params. So if you use your browser to seed the request, params are missing. If you want to see the result go this. Thanks
Most helpful comment
After a few rounds of trials and failures, I finally got it working. Your answer did really help a lot to solve my curiosities. Due to my entry level knowledge to Nods.js & MongoDB, I had a few misunderstanding in how it works: (I know they sound dumb but just posting it to help any other newbies who would make similar mistakes in future)
mongodbefore running Parse Server.DATABASE_URIin `index.js'Everything is crystal clear now. Thanks heaps lads!!
p.s: Just curious how it is going in regards to the development of Dashboard.