Code Monkey home page Code Monkey logo

parse-server-azure's Introduction

Parse-Server-Azure

npm version dependencies Adapters, tools, and documentation to use Parse-Server with Microsoft Azure, brought to you by your friends at Microsoft.

📝 Find detailed instructions in the Wiki!

npm install parse-server-azure

If you're using parse-server at version 2.2 (or below), please install with:

npm install [email protected]

General Usage

...
var ParseServerAzure = require('parse-server-azure');
var api = new ParseServer({
    ...
    filesAdapter: new ParseServerAzure.FilesAdapter(account, container, filesOptions),
    pushAdapter: new ParseServerAzure.PushAdapter(pushOptions)
    ...
});
...

FilesAdapter

By default, Parse-Server uses the GridStoreAdapter to store files, meaning that files will be stored in the connected database. For better performance, you can store files in Azure Blob Storage, using this module's FilesAdapter.

var ParseServer         = require('parse-server').ParseServer;
var AzureStorageAdapter = require('parse-server-azure').FilesAdapter;

var account = 'YOUR_AZURE_STORAGE_ACCOUNT_NAME';
var container = 'YOUR_AZURE_STORAGE_CONTAINER_NAME';
var options = {
    accessKey: 'YOUR_ACCESS_KEY',
    directAccess: false // If set to true, files will be served by Azure Blob Storage directly
}

var api = new ParseServer({
  appId: process.env.APP_ID || 'myAppId',
  serverURL: process.env.SERVER_URL || 'http://localhost:1337'
  (...)
  filesAdapter: new AzureStorageAdapter(account, container, options);
});

Direct Access

By default, Parse will proxy all files - meaning that your end user accesses the files via your open source Parse-Server, not directly by going to Azure Blob storage. This is useful if you want files to only be accessible for logged in users or have otherwise security considerations.

If your files can be public, you'll win performance by accessing files directly on Azure Blob Storage. To enable, ensure that your container's security policy is set to blob. Then, in your adapter options, set directAccess: true.

PushAdapter

Find the most up to date documentation at the repository: https://github.com/mamaso/parse-server-azure-push

License

The MIT License (MIT); Copyright (c) 2016 Microsoft Corporation. Please see LICENSE for details.

parse-server-azure's People

Contributors

felixrieseberg avatar

Stargazers

adaruru avatar Benjamin Heintz avatar Asim Hussain avatar Victor Moreno avatar Dennis Liger avatar Michael Mansour avatar Andres Pineda avatar Ethan Fan avatar Jonathan Lott avatar 曹文忠 avatar Don Miller avatar (╯°□°)╯︵ uᴉǝssnH ɐɟɐʇsoW avatar Brian Davis avatar Money avatar Foti Dim avatar Martin Erlic avatar Wladimir Neto avatar Sandrino Di Mattia avatar Jaydeep avatar Cristi Ursachi avatar  avatar Katsuyuki Sakai avatar  avatar

Watchers

James Cloos avatar Eric Barnard avatar  avatar  avatar

parse-server-azure's Issues

MongoDB version is v3.2, but parse server prerequisites says that it should be 2.6.x or 3.0.x

Hello. I have one question. How do I change MongoDB version on DocumentDB? Because now, after creating it using the publication of Parse Server with Azure Managed Services, it's v3.2.0, but whenever I try to migrate parse database, it says that I need 2.6.x or 3.0.x. Of course, I can ignore this error, but I've found out that when using v3.2.0 there appears to be some bugs in queries etc. And mongodb v2.6 or v3.0 is in parse server prerequisites.

Thanks!

Document DB is too expensive

Hi, my parse App haves 5-6 classes. Azure translate each class as a collection on Document DB. The problem is that having so many collection (5 approximately) is very expensive (+250$/month). Do you have a less expensive approach? My App is relatively small and I can't afford to pay 300$ per month. (I’ve a budget of 100€/month)
Thank you very much

DocumentDB: Connection timeout from parse-dashboard

Hello,

I just installed parse server on azure services and faced problem with displaying data in parse-dashboard. I just create parse server on azure according to this article, everything before migrating your app part:
https://azure.microsoft.com/en-us/blog/announcing-the-publication-of-parse-server-with-azure-managed-services/
Just after my data from parse.com was migrated, i go to azure-parse-dashboard and trying to verify my collection. But when I try to display table with 515k records - it display nothing. When I go logs section I found this error there:

2016-10-23T18:57:56.191Z - Uncaught internal server error. { [MongoError: connection 51 to ziveparseserverdb-parse.documents.azure.com:10250 timed out]
name: 'MongoError',
message: 'connection 51 to ziveparseserverdb-parse.documents.azure.com:10250 timed out' } MongoError: connection 51 to ziveparseserverdb-parse.documents.azure.com:10250 timed out
at Function.MongoError.create (D:\home\site\wwwroot\node_modules\mongodb-core\lib\error.js:29:11)
at TLSSocket. (D:\home\site\wwwroot\node_modules\mongodb-core\lib\connection\connection.js:173:20)
at TLSSocket.g (events.js:260:16)
at emitNone (events.js:67:13)
at TLSSocket.emit (events.js:166:7)
at TLSSocket.Socket._onTimeout (net.js:332:8)
at _runOnTimeout (timers.js:524:11)
at _makeTimerTimeout (timers.js:515:3)
at Timer.unrefTimeout (timers.js:584:5)
2016-10-23T18:57:56.191Z - Error generating response. { [MongoError: connection 51 to ziveparseserverdb-parse.documents.azure.com:10250 timed out]
name: 'MongoError',
message: 'connection 51 to ziveparseserverdb-parse.documents.azure.com:10250 timed out' }

When i tried to display the same collection with filter - seems everything is ok.

How can I fix displaying all my data correctly???

Thanks in advance, Egor

How modify cloud and sync with github ?

If I install, can I disconnect in the setting ? How get all file in my github folder to synchronise cloud ?

NOTE : scm on Azure don't work on all my website since 3 days...

regards,

i can't find Parse Server on the Azure Marketplace

Hi,
I try to follow the instructions detailed on the wiki, but i'm stuck on this step:

Select Parse Server on managed Azure services published by Microsoft.

I'can't find this asset on the Marketplace.
Can you help me ?
Thanks a lot

MongoError: "Encountered exception while executing Javascript. Query root must be specified."

Hi,
For several months, I use Parse server azure without problems but since a few hours I'm getting this error:

2017-02-01T09:23:51.925Z - Uncaught internal server error. { [MongoError: Message: {"Errors":["Encountered exception while executing Javascript. Exception = Error: Invalid argument. Query root must be specified.\r\nStack trace: Error: Invalid argument. Query root must be specified.\n at commonUpdate (.sys.commonUpdate.js:2288:17)\n at docDbMain (.sys.commonUpdate.js:4:5)\n at Global code (.sys.commonUpdate.js:1:2)"]}
ActivityId: 3a721634-0000-0000-0000-000000000000, Request URI: rntbd://10.100.100.77:14000/apps/f8a35ed9-3dea-410f-a89a-28650ff41381/services/ab284460-dfd9-4fc6-8366-48ae5708818e/partitions/a108a897-4a3c-44f0-aa7d-477d08f77d67/replicas/131193282907353114p]
name: 'MongoError',
message: 'Message: {"Errors":["Encountered exception while executing Javascript. Exception = Error: Invalid argument. Query root must be specified.\r\nStack trace: Error: Invalid argument. Query root must be specified.\n at commonUpdate (.sys.commonUpdate.js:2288:17)\n at docDbMain (.sys.commonUpdate.js:4:5)\n at Global code (.sys.commonUpdate.js:1:2)"]}\r\nActivityId: 3a721634-0000-0000-0000-000000000000, Request URI: rntbd://10.100.100.77:14000/apps/f8a35ed9-3dea-410f-a89a-28650ff41381/services/ab284460-dfd9-4fc6-8366-48ae5708818e/partitions/a108a897-4a3c-44f0-aa7d-477d08f77d67/replicas/131193282907353114p',
_t: 'OKMongoResponse',
ok: 0,
code: 2,
errmsg: 'Message: {"Errors":["Encountered exception while executing Javascript. Exception = Error: Invalid argument. Query root must be specified.\r\nStack trace: Error: Invalid argument. Query root must be specified.\n at commonUpdate (.sys.commonUpdate.js:2288:17)\n at docDbMain (.sys.commonUpdate.js:4:5)\n at Global code (.sys.commonUpdate.js:1:2)"]}\r\nActivityId: 3a721634-0000-0000-0000-000000000000, Request URI: rntbd://10.100.100.77:14000/apps/f8a35ed9-3dea-410f-a89a-28650ff41381/services/ab284460-dfd9-4fc6-8366-48ae5708818e/partitions/a108a897-4a3c-44f0-aa7d-477d08f77d67/replicas/131193282907353114p',
'$err': 'Message: {"Errors":["Encountered exception while executing Javascript. Exception = Error: Invalid argument. Query root must be specified.\r\nStack trace: Error: Invalid argument. Query root must be specified.\n at commonUpdate (.sys.commonUpdate.js:2288:17)\n at docDbMain (.sys.commonUpdate.js:4:5)\n at Global code (.sys.commonUpdate.js:1:2)"]}\r\nActivityId: 3a721634-0000-0000-0000-000000000000, Request URI: rntbd://10.100.100.77:14000/apps/f8a35ed9-3dea-410f-a89a-28650ff41381/services/ab284460-dfd9-4fc6-8366-48ae5708818e/partitions/a108a897-4a3c-44f0-aa7d-477d08f77d67/replicas/131193282907353114p' } MongoError: Message: {"Errors":["Encountered exception while executing Javascript. Exception = Error: Invalid argument. Query root must be specified.\r\nStack trace: Error: Invalid argument. Query root must be specified.\n at commonUpdate (.sys.commonUpdate.js:2288:17)\n at docDbMain (.sys.commonUpdate.js:4:5)\n at Global code (.sys.commonUpdate.js:1:2)"]}
ActivityId: 3a721634-0000-0000-0000-000000000000, Request URI: rntbd://10.100.100.77:14000/apps/f8a35ed9-3dea-410f-a89a-28650ff41381/services/ab284460-dfd9-4fc6-8366-48ae5708818e/partitions/a108a897-4a3c-44f0-aa7d-477d08f77d67/replicas/131193282907353114p
at Function.MongoError.create (D:\home\site\wwwroot\node_modules\parse-server\node_modules\mongodb\node_modules\mongodb-core\lib\error.js:31:11)
at D:\home\site\wwwroot\node_modules\parse-server\node_modules\mongodb\node_modules\mongodb-core\lib\connection\pool.js:462:72
at authenticateStragglers (D:\home\site\wwwroot\node_modules\parse-server\node_modules\mongodb\node_modules\mongodb-core\lib\connection\pool.js:410:16)
at null.messageHandler (D:\home\site\wwwroot\node_modules\parse-server\node_modules\mongodb\node_modules\mongodb-core\lib\connection\pool.js:444:5)
at TLSSocket. (D:\home\site\wwwroot\node_modules\parse-server\node_modules\mongodb\node_modules\mongodb-core\lib\connection\connection.js:306:22)
at emitOne (events.js:77:13)
at TLSSocket.emit (events.js:169:7)
at readableAddChunk (_stream_readable.js:153:18)
at TLSSocket.Readable.push (_stream_readable.js:111:10)
at TLSWrap.onread (net.js:536:20)
2017-02-01T09:23:51.925Z - Error generating response. { [MongoError: Message: {"Errors":["Encountered exception while executing Javascript. Exception = Error: Invalid argument. Query root must be specified.\r\nStack trace: Error: Invalid argument. Query root must be specified.\n at commonUpdate (.sys.commonUpdate.js:2288:17)\n at docDbMain (.sys.commonUpdate.js:4:5)\n at Global code (.sys.commonUpdate.js:1:2)"]}
ActivityId: 3a721634-0000-0000-0000-000000000000, Request URI: rntbd://10.100.100.77:14000/apps/f8a35ed9-3dea-410f-a89a-28650ff41381/services/ab284460-dfd9-4fc6-8366-48ae5708818e/partitions/a108a897-4a3c-44f0-aa7d-477d08f77d67/replicas/131193282907353114p]
name: 'MongoError',
message: 'Message: {"Errors":["Encountered exception while executing Javascript. Exception = Error: Invalid argument. Query root must be specified.\r\nStack trace: Error: Invalid argument. Query root must be specified.\n at commonUpdate (.sys.commonUpdate.js:2288:17)\n at docDbMain (.sys.commonUpdate.js:4:5)\n at Global code (.sys.commonUpdate.js:1:2)"]}\r\nActivityId: 3a721634-0000-0000-0000-000000000000, Request URI: rntbd://10.100.100.77:14000/apps/f8a35ed9-3dea-410f-a89a-28650ff41381/services/ab284460-dfd9-4fc6-8366-48ae5708818e/partitions/a108a897-4a3c-44f0-aa7d-477d08f77d67/replicas/131193282907353114p',
_t: 'OKMongoResponse',
ok: 0,
code: 2,
errmsg: 'Message: {"Errors":["Encountered exception while executing Javascript. Exception = Error: Invalid argument. Query root must be specified.\r\nStack trace: Error: Invalid argument. Query root must be specified.\n at commonUpdate (.sys.commonUpdate.js:2288:17)\n at docDbMain (.sys.commonUpdate.js:4:5)\n at Global code (.sys.commonUpdate.js:1:2)"]}\r\nActivityId: 3a721634-0000-0000-0000-000000000000, Request URI: rntbd://10.100.100.77:14000/apps/f8a35ed9-3dea-410f-a89a-28650ff41381/services/ab284460-dfd9-4fc6-8366-48ae5708818e/partitions/a108a897-4a3c-44f0-aa7d-477d08f77d67/replicas/131193282907353114p',
'$err': 'Message: {"Errors":["Encountered exception while executing Javascript. Exception = Error: Invalid argument. Query root must be specified.\r\nStack trace: Error: Invalid argument. Query root must be specified.\n at commonUpdate (.sys.commonUpdate.js:2288:17)\n at docDbMain (.sys.commonUpdate.js:4:5)\n at Global code (.sys.commonUpdate.js:1:2)"]}\r\nActivityId: 3a721634-0000-0000-0000-000000000000, Request URI: rntbd://10.100.100.77:14000/apps/f8a35ed9-3dea-410f-a89a-28650ff41381/services/ab284460-dfd9-4fc6-8366-48ae5708818e/partitions/a108a897-4a3c-44f0-aa7d-477d08f77d67/replicas/131193282907353114p' }

Others users encountered the same issue:
parse-community/parse-server#3462
Thanks for you help

Parse Server Shutting Down Frequently

After updating my parse server from 2.1.4 on Azure it seems that there is an issue with up-time. Frequently, my parse server is down. Every time it is down I can temporarily fix it by restarting the server at index.js and then everything works fine, however, after 5 minutes it shuts down again. Any ideas on how this issue could be resolved?

Unable to have a running parseserver on azure

Hi,

Deployed Parseserver for Azure for am unable to get it working. I get HTTP 500 when accessing the URL. No parse-dashboard either.

Does the current situation not work anymore?

Regards, Rob

parse-server-modules

Noticed that the parse guys set up https://github.com/parse-server-modules

It currently has a fork of parse-server-azure, but it's out of date. I wonder how we should handle ownership of this; either we can submit PRs to update the fork whenever we make changes, or use parse-server-modules as the main repository.

Thoughts?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.