问题说明
在解析服务器上运行requet时出错
我从parse-server开始尝试传递postgres uri for Database URI, 例如。 parse-server --appId APPLICATION_ID --masterKey MASTER_KEY --databaseURI postgres:// user:password @ localhost / db_name,它启动时没有问题但是当我尝试卷曲请求来测试它时说
错误:未捕获的内部服务器错误。错误:架构无效,预期mongodb
它在启动时接受postgres url但是它在内部使用mongo db而不是postgres 重现的步骤
尝试新的克隆和npm install
将数据库uri设置为postgres:// user:password @ localhost:5432 / db_name并尝试使用curl请求创建对象 例如。 curl -X POST -H“X-Parse-Application-Id:APPLICATION_ID”-H“Content-Type:application / json”-d'{“sce”:false}'http://localhost:1337/parse/classes/GameScore 预期结果
{ “objectId”:“some-obj-id”, “createdAt”:“时间戳” }
实际结果
错误:未捕获的内部服务器错误。错误:架构无效,预期mongodb ......
环境设置
Server
parse-server version (Be specific! Don't say 'latest'.) : 2.3.6
Operating System: Ubuntu 14.04
Hardware: Local System
Localhost or remote server? (AWS, Heroku, Azure, Digital Ocean, etc): localhost
Database
MongoDB version: Not MongoDb
Postgres version - 9.6.2
Storage engine: none
Hardware: Local System
Localhost or remote server? (AWS, mLab, ObjectRocket, Digital Ocean, etc): Localhost
日志/跟踪
{“level”:“error”,“message”:“未捕获的内部服务器错误。错误:架构无效,预计mongodb \ n ......}