CentOS 6.9/7安装Parse+PostgreSQL

一、安装Parse-Server

# npm install -g parse-server --unsafe-perm

备注:用--unsafe-perm参数的目的是使用了root权限进行安装。

二、启动Parse并测试

// 修改数据库支持只用用户名登录
# vi /var/lib/pgsql/10/data/pg_hba.conf
// 在最后找到这样host all all 127.0.0.1/32 ident
// 改为host all all 127.0.0.1/32 trust
// 重新读取配置文件
# service postgresql-10 reload
// 启动parse
# parse-server --appId APPLICATION_ID --masterKey MASTER_KEY --restAPIKey RESTAPI_KEY --databaseURI postgres://postgres@127.0.0.1:5432/postgres
// 使用curl测试,正常返回即可
# curl -X POST -H "X-Parse-Application-Id: APPLICATION_ID" -H "X-Parse-REST-API-Key: RESTAPI_KEY" -H "Content-Type: application/json" -d '{"score":1337,"playerName":"Sean Plott","cheatMode":false}' http://localhost:1337/parse/classes/GameScore

备注:数据库使用的是PostgreSQL

 

参考:

https://stackoverflow.com/questions/29468404/gyp-warn-eacces-user-root-does-not-have-permission-to-access-the-dev-dir(安装报错的解决方法)

https://www.cnblogs.com/jaxu/p/5864134.html(安装报错的解决方法)

http://docs.parseplatform.org/parse-server/guide/(官网)

http://docs.parseplatform.org/rest/guide/(官网API)

https://github.com/parse-community/parse-server

 

转载于:https://www.cnblogs.com/EasonJim/p/9023914.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值