/ Example express application adding the parse-server module to expose Parse
// compatible API routes.
var api = new ParseServer({
...
}
});
// Parse Server plays nicely with the rest of your web routes
// =================================================================
MY QUESTION IS ON THIS METHOD
// =================================================================
app.get('/', function(req, res) {
res.status(200).send('I dream of being a website. Please star the parse- server repo on GitHub!');
});
这是解析服务器示例(https://github.com/ParsePlatform/parse-server-example)中index.js的一个片段。是否可以使用从初始化服务器获取的ParseServer实例来访问数据库?
编辑:对不起伙计们,我在2017年发布了这个问题。我无法理解我在问什么。 :-(。
是的,这是可能的,但不建议像那样运行它。
云代码(main.js
)是我建议您使用的。
cloud: process.env.CLOUD_CODE_MAIN || __dirname + '/cloud/main.js',