使用解析服务器API从index.j中的db读取

问题描述 投票:0回答:1
/ 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年发布了这个问题。我无法理解我在问什么。 :-(。

node.js parse-platform parse-server
1个回答
0
投票

是的,这是可能的,但不建议像那样运行它。

云代码(main.js)是我建议您使用的。

  cloud: process.env.CLOUD_CODE_MAIN || __dirname + '/cloud/main.js',
© www.soinside.com 2019 - 2024. All rights reserved.