Where files are allocated in Parse Server?

丶灬走出姿态 提交于 2020-01-07 04:35:16

问题


I'm implementing an instance of Parse Server, I want know where the Parse Server Allocated the files ?


回答1:


Depends on the operating system and type of installation you used.

If installed on a linux/unix using the global install npm install -g parse-server mongodb-runner then your parse-server files will normally be under usr/lib/node_modules/parse-server. ( may differ from linux versions )

be careful when editing these files for hot hacks or modifications. If you later choose to upgrade parse-server they will be overwritten.

Your cloud file directly is normally created by you. So this could be home/parse/cloud/main.js. This can be in any location of your choice. To set a new location you will set that in the index file or json (depending on your startup process ).

cloud: '/home/myApp/cloud/main.js', // Absolute path to your Cloud Code

If you installed not using the global install, then obviously you would need to cd to where you cloned the project.

Windows would be similar. Clone (or download the zip) parse-server from the repo. Open a console window and “cd” to the folder where you have cloned/extracted the example server, eq:

cd "C:\parse-server"

Here is where the files will sit on the parse-server. Hopes this helps!




回答2:


According to File Adapter, the default file storage is GridFS in mongodb.



来源:https://stackoverflow.com/questions/41213387/where-files-are-allocated-in-parse-server

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!