为了记录这奇迹的时刻,我开始吐血折腾,百度谷歌解决我所有的问题,开始吧!
安装到应用,简单完成
时间:10月7号下午
参考视频 https://www.youtube.com/watch?v=tB03A2-_x1s
第1步:下载并解压且 : https://github.com/parse-community/parse-server-example
1 |
cd parse-server-example-master |
第2步:安装依赖
1 |
npm install |
成功之后,可以试试 npm start,浏览器里输入http://localhost:1337/ 页面上输出 I dream of being a website. Please star the parse-server repo on GitHub! 则表示成功了
第3步:本地安装 dashboard
为啥要本地,估计是方便文件管理罗。注意这里save 前面是两个- 。
1 |
npm install parse-dashboard --save |
第4步:修改index.js -》 启动parse 服务的同时,启动dashboard. 参考 https://github.com/parse-community/parse-dashboard
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
// Example express application adding the parse-server module to expose Parse // compatible API routes. var express = require('express'); var ParseServer = require('parse-server').ParseServer; var path = require('path'); var ParseDashboard = require('parse-dashboard'); var databaseUri = process.env.DATABASE_URI || process.env.MONGODB_URI; if (!databaseUri) { console.log('DATABASE_URI not specified, falling back to localhost.'); } var api = new ParseServer({ databaseURI: databaseUri || 'mongodb://localhost:27017/dev', cloud: process.env.CLOUD_CODE_MAIN || __dirname + '/cloud/main.js', appId: process.env.APP_ID || 'myAppId', masterKey: process.env.MASTER_KEY || 'myMasterKey', //Add your master key here. Keep it secret! serverURL: process.env.SERVER_URL || 'http://localhost:1337/parse', // Don't forget to change to https if needed liveQuery: { classNames: ["Posts", "Comments"] // List of classes to support for query subscriptions } }); // Client-keys like the javascript key or the .NET key are not necessary with parse-server // If you wish you require them, you can set them as options in the initialization above: // javascriptKey, restAPIKey, dotNetKey, clientKey var dashboard = new ParseDashboard({ "apps": [ { "serverURL": "http://localhost:1337/parse", "appId": "myAppId", "masterKey": "myMasterKey", "appName": "MyApp" } ], "users": [ { "user": "user1", "pass": "pass" } ] }); var app = express(); // make the Parse Dashboard available at /dashboard app.use('/dashboard', dashboard); // Serve static assets from the /public folder app.use('/public', express.static(path.join(__dirname, '/public'))); // Serve the Parse API on the /parse URL prefix var mountPath = process.env.PARSE_MOUNT || '/parse'; app.use(mountPath, api); // Parse Server plays nicely with the rest of your web routes app.get('/', function(req, res) { res.status(200).send('I dream of being a website. Please star the parse-server repo on GitHub!'); }); // There will be a test page available on the /test path of your server url // Remove this before launching your app app.get('/test', function(req, res) { res.sendFile(path.join(__dirname, '/public/test.html')); }); var port = process.env.PORT || 1337; var httpServer = require('http').createServer(app); httpServer.listen(port, function() { console.log('parse-server-example running on port ' + port + '.'); }); // This will enable the Live Query real-time server ParseServer.createLiveQueryServer(httpServer); |
保存
1 |
npm start |
浏览器 http://localhost:1337/dashboard 即成功 ,一个没有配置 appid 与 key 的纯洁应用就完成了。
还是视频教程Nice
Unity端
时间 10月8号上午
Parse本身提供Unity端,不过是.net 3.5,我使用的是2019,4.x版本。直接下载的这里 https://github.com/parse-community/Parse-SDK-dotNET 里面的Parse文件夹
建立一个脚本,拖进场景里。命名空间加上
1 2 3 |
using Parse; using UnityEngine; using System.Threading.Tasks; |
脚本内容加上,Data是我的本地持久化数据端。不用在意,手动删了就行。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
public string appid = "myAppId"; public string masterKey = "myMasterKey"; public string serverUrl; [SerializeField] private string testurl = @"http://localhost:1337/parse/"; private ParseData Data => ParseData.instance; public bool dontUseTest = false; public bool hasPlayerData = false; public ParseObject curPlayer = null; public string url { get { var ServerURI = serverUrl; if (!dontUseTest) { #if UNITY_EDITOR ServerURI = testurl; #endif } return ServerURI; } } private void Awake() { DontDestroyOnLoad(gameObject); Debug.Log("Cur url is " + url); ParseClient.Initialize(new ParseClient.Configuration { ApplicationID = appid, Key = masterKey, ServerURI = url }); } private void Start() { //StartNormal(); _ = StartAsync(); } private async Task StartAsync() { System.AggregateException error = null; //get data if (Data.UserId != "") { Debug.Log("读取"); ParseQuery<ParseObject> query = ParseObject.GetQuery("Player"); await query.GetAsync(Data.UserId).ContinueWith(t => { error = t.Exception; Debug.Log("更新成功" + t.Result.ObjectId); curPlayer = t.Result; }); if (error != null) { Debug.LogError(error); return; } hasPlayerData = true; } else { Debug.Log("新建"); var name = "Player_"; ParseQuery<ParseObject> query = ParseObject.GetQuery("Player"); await query.CountAsync().ContinueWith(t => { error = t.Exception; name += t.Result; }); if (error != null) { Debug.LogError(error); return; } ParseObject po = new ParseObject("Player"); po["name"] = name; await po.SaveAsync().ContinueWith(t => { error = t.Exception; }); if (error != null) { Debug.LogError(error); return; } Debug.Log("建立成功" + po.ObjectId + " name:" + name); Data.UserId = po.ObjectId; Data.Name = po.Get<string>("name"); Data.SaveData(); curPlayer = po; } } |
跑,看log,看后台。说明成功了,能打apk,还没有跑,目测已经没有问题了。MasterKey和Appid随便填没有影响,貌似还没有找到原因。
Linux 服务器端
其实和Windows端大同小异,一开始搭建好了之后,浏览器无法访问,以为是index.js里面的设置问题,后面加了
1 2 3 4 |
var options = { allowInsecureHTTP: true }; var dashboard = new ParseDashboard({ ... }, options); |
发现还是少了一步,那是因为云服务器的安全组入方向默认是关闭的。
解决方法:登录云服务器,找到你的实例 – 进入安全组 – 入方向 – 添加规则 – 自定义 1337/1337 0.0.0.0/0 OK
Unity尝试一下,,报错了,把MasterKey与AppID填上,OK,大功造成,一个冒牌货服务端人员最后终于搭建出了自己的后端,恭喜发财!
总结:
搭好了之后,客户端一直报错,很长一段时间后才尼玛发现url最后少了一个/,这么一个小小的细节浪费了我两个小时。但是结局总是好的,一劳永逸,你的leanCloud搭好了,并且节省了1.5个全职服务端,不过我的任务还没有完成,毕竟是本地测试还需要上传到服务器。
感谢那个爱折腾的自己,虽然过程中经历过心肌梗塞般难耐,但是最终还是成功了。以此篇文章向过去挣扎的那段光阴表示致敬! 谢谢观看。
Windows 上进行安装尝试,最后配置有点问题
时间:10月6号 – 10月7号12点
我又双叕来了,距上次已经过了一周,愉快的国庆假期已接近尾声。今天是6号,上次做的事情卡住了,这次为了理一下流程,我决定先从windows上安装一下下。
前提条件
环境:
- node
- python
- npm
惊喜的是,我电脑上都有,接下来应该还得有:
- mongoDB
- parse-server
- parse-dashboard (虽然是个后台显示,但我觉得是必要,当统计也能用啊)
- express (官方,百度了一下,这个是nodejs 的一套框架,可以让parse-server 快速的运行)
开始安装
第1步,npm 安装 parse-server 以及 mongodb
补充,查了查资料,需要安装msi, 貌似明白了一些道理,npm 安装的 mongodb 只是启动monogoDB的代码,不包括monogodb本身。
https://www.mongodb.com/download-center/community 下载并安装,为了方便安装后还是加入环境变量的好,加完之后命令行 mongo 就有了
1 2 3 4 5 6 7 8 9 10 11 12 13 |
> npm install -g parse-server mongodb-runner + mongodb-runner@4.7.2 + parse-server@3.9.0 #可惜的是我mongodb-runner start 还是报错 > mongodb-runner start HTTPError: Response code 403 (Forbidden) #按照之前的教训,换一个方式仍然不行: > MONGODB_VERSION=3.2.5 mongodb-runner start 'MONGODB_VERSION'也会报 不是内部或外部命令,也不是可运行的程序 #我这投机了,直接: (感觉没有什么不对) > npm install -g mongodb + mongodb@3.3.2 |
1.2 在mongodb 的安装目录下我找到了Readme文件,其中有这样的说明(4个依赖项)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
## Troubleshooting The MongoDB driver depends on several other packages. These are: * [mongodb-core](https://github.com/mongodb-js/mongodb-core) * [bson](https://github.com/mongodb/js-bson) * [kerberos](https://github.com/mongodb-js/kerberos) * [node-gyp](https://github.com/nodejs/node-gyp) #按照正常人思路,当然是一个不落的全部装了: >npm install -g mongodb-core<br> + mongodb-core@3.2.7 >npm install -g bson<br> + bson@4.0.2 >npm install -g kerberos > kerberos@1.1.3 install E:\Link_Foders\Roaming\npm\node_modules\kerberos > prebuild-install || node-gyp rebuild + kerberos@1.1.3 >npm install -g node-gyp E:\Link_Foders\Roaming\npm\node-gyp -> E:\Link_Foders\Roaming\npm\node_modules\node-gyp\bin\node-gyp.js + node-gyp@6.0.0 |
第2步,(其实顺序的无所谓了,我是看心情的)安装dashboard
1 2 |
>npm install -g parse-dashboard + parse-dashboard@2.0.3 |
第3步,安装express
1 2 3 4 5 |
>npm install express -g + express@4.17.1 #小插曲,这里说命令与工具分开了: https://www.cnblogs.com/learnings/p/7372718.html 管它3721,装就对了 npm install -g express-generator |
第4步,下载启动模板 https://github.com/parse-community/parse-server-example,解压到你的目录下, 修改index.js
我这里参考了 https://segmentfault.com/a/1190000010927322
然后就是cd 到此目录下,npm start , 很不幸地,我发生了以下错误
1 2 3 4 5 6 7 8 9 10 11 |
Error: Cannot find module 'express' at Function.Module._resolveFilename (module.js:547:15) at Function.Module._load (module.js:474:25) at Module.require (module.js:596:17) at require (internal/module.js:11:18) at Object.<anonymous> (E:\Projects\_Server\parse-server-run\index.js:8:15) at Module._compile (module.js:652:30) at Object.Module._extensions..js (module.js:663:10) at Module.load (module.js:565:32) at tryModuleLoad (module.js:505:12) at Function.Module._load (module.js:497:3) |
没有找到express..
1 2 3 4 5 6 |
"dependencies": { "express": "~4.11.x", "kerberos": "~0.0.x", "parse": "~1.8.0", "parse-server": "*" }, |
看了 https://blog.csdn.net/zrcj0706/article/details/79178371 这篇文章,仿佛,貌似,突然感觉我前面3步做的都是白费的,一把辛酸泪滴在裤裆。
1 2 |
#在项目目录下 npm install |
几十分钟后就ok了,最后npm start就算成功运行。dashboard 下次再来
总结
- 之前的思路是,直接连上服务器就走命令,其实是很失误的作法,应该在本地跑通后,记录哪些是需要单独安装的环境,哪些是本地直接就可以同步服务器的代码,最后上传即可
- 对于小白用户来说,不断的搜索是唯一的出路,应该多看看再动手,执行太靠前反而不是很好
- 该提前补点服务器常识,不然后太痛苦
- 该多看看parse的其它部署方法,比如最后在app.json里面还了解到了heroku这东西,感觉又是另一片天地
OK,今天差不多到这里吧。改日再战
次日
我又双叕䮕来了,7号,昨天虽然说运行成功了,但是留下了不少问题
- parse-server示例项目 运行成功了,命令行一关就失效
- dashboard 运行成功了,浏览器可以打开,但是除了开头动画,没有任何的东西出来,没有登录什么的。
昨晚好奇heroku这东西,注册了个号(要信用卡才生效),大概填了很少的一些配置文件,就自动生成了,网址https://psplaceit.herokuapp.com/,与本地部署完了之后打开网址是一毛一样的,帮你节省了服务器配置相关的工作(安装各种环境、软件、以及部署一类),缺点肯定是有数据库大小限制,国内的连接速度也不太确定。我打算还是把本地的先研究明白再说
我的理解如图,最后无法查看后台,说明还是配置上有问题,换个思路了,重新再来了!段落到此吧
总结
- 没有找到一步到位的教程,应该先从Youtube下手的,视频才是最好解。
从安装到失败,最后放弃~(请不要当教程)
时间:19年9月29号 – 30号
我使用的是SecureCRT客户端来进行远程的连接与命令发送。
Parser Server 安装引导的网址来自这里 https://docs.parseplatform.org/parse-server/guide/
0、按照一些前提:
1 2 3 4 |
Node 8 or newer MongoDB version 2.6.X, 3.0.X or 3.2.X Python 2.x (For Windows users, 2.7.1 is the required version) For deployment, an infrastructure provider like Heroku or AWS |
node –version
v12.10.0
python
Python 2.6.6 (r266:84292, Jun 20 2019, 14:14:55) #这个没问题
MonogoDB没装,按引导理解,应该会自己装吧- –
1、按照引导,走mongodb出现这个错: mongodb-runner start
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
# mongodb-runner start ◞ Starting a MongoDB deployment to test against...StdError [HTTPError]: Response code 403 (Forbidden) at EventEmitter.<anonymous> (/usr/local/lib/node_modules/mongodb-runner/node_modules/got/index.js:250:24) at EventEmitter.emit (events.js:209:13) at Immediate.<anonymous> (/usr/local/lib/node_modules/mongodb-runner/node_modules/got/index.js:99:8) at processImmediate (internal/timers.js:439:21) { name: 'HTTPError', host: 'fastdl.mongodb.org', hostname: 'fastdl.mongodb.org', method: 'GET', path: '/linux/mongodb-linux-x86_64-4.2.0.tgz', protocol: 'https:', url: 'https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-4.2.0.tgz', statusCode: 403, statusMessage: 'Forbidden', headers: { 'content-type': 'application/xml', 'transfer-encoding': 'chunked', connection: 'close', date: 'Sun, 29 Sep 2019 01:04:41 GMT', server: 'AmazonS3', 'x-cache': 'Error from cloudfront', via: '1.1 e4404fd3b1d2ac38d3124fbc6bbedc8b.cloudfront.net (CloudFront)', 'x-amz-cf-pop': 'NRT57-C2', 'x-amz-cf-id': 'L4VSmwpiBgoOTPZEbdqsIKdMg-UxhsTiKcnaYJ46bZ5YDtQ1b0zFSQ==' } } StdError [HTTPError]: Response code 403 (Forbidden) at EventEmitter.<anonymous> (/usr/local/lib/node_modules/mongodb-runner/node_modules/got/index.js:250:24) at EventEmitter.emit (events.js:209:13) at Immediate.<anonymous> (/usr/local/lib/node_modules/mongodb-runner/node_modules/got/index.js:99:8) at processImmediate (internal/timers.js:439:21) { name: 'HTTPError', host: 'fastdl.mongodb.org', hostname: 'fastdl.mongodb.org', method: 'GET', path: '/linux/mongodb-linux-x86_64-4.2.0.tgz', protocol: 'https:', url: 'https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-4.2.0.tgz', statusCode: 403, statusMessage: 'Forbidden', headers: { 'content-type': 'application/xml', 'transfer-encoding': 'chunked', connection: 'close', date: 'Sun, 29 Sep 2019 01:04:41 GMT', server: 'AmazonS3', 'x-cache': 'Error from cloudfront', via: '1.1 e4404fd3b1d2ac38d3124fbc6bbedc8b.cloudfront.net (CloudFront)', 'x-amz-cf-pop': 'NRT57-C2', 'x-amz-cf-id': 'L4VSmwpiBgoOTPZEbdqsIKdMg-UxhsTiKcnaYJ46bZ5YDtQ1b0zFSQ==' } } |
这代码应该是安装MonogoDB的。
npm install -g mongodb-version-manager@latest 看了个帖,直接跑这个https://github.com/mongodb-js/version-manager/issues/146 但是RX的,download-url/ 是什么鬼。下面是我跑了npm install -g mongodb-version-manager@latest后:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
mongodb-version-manager --help m The MongoDB version manager. Usage: m use <version> [--branch=<branch> --distro=<distro> --enterprise] m url <version> [--branch=<branch> --distro=<distro> --enterprise] m available [--stable --unstable --rc --pokemon] m available <range> m list m path Examples: m use <version> # Install or activate MongoDB <version> m use latest # Install or activate latest MongoDB release m use stable # Install or activate most recent stable MongoDB release m path # Print the absolute path to the current MongoDB version m available # List all available versions m available 3.5.x # List available versions matching any semver range m list # List all locally installed versions m url stable # Print download URL for the latest stable version m url 2ce51c8e0d4bf84589bffa87e59f2401578c2572 # Download URL for mci artifact at a specific commit Options: -h --help Show this screen. --version Show version. --debug Show debugging messages. --url Print download URL and exit. --stable Only list available stable versions. --unstable Only list available unstable versions. --rc Include release candidates in available versions. --pokemon Show all available versions you do not have installed, so you can collect all the MongoDB's. --enterprise Use MongoDB enterprise. |
看样子是个方便安装与管理mongoDB的集合体。
# m use 3.2.1
Killed 为毛啊- -,没有输出Log
MONGODB_VERSION=3.2.5 mongodb-runner start
◠ Starting a MongoDB deployment to test against…Killed
线索断了,重启一下服务器 init 6
1 2 3 |
MONGODB_VERSION=3.2.5 mongodb-runner start ◞ Starting a MongoDB deployment to test against...✔ Downloaded MongoDB 3.2.5 ◟ Starting a MongoDB deployment to test against... |
我R 成功了?用这个也能看到了
1 2 |
m use 3.2.5 switched to 3.2.5 |
但是 npm start 报错了看了一下log
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
0 info it worked if it ends with ok 1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'start' ] 2 info using npm@6.10.3 3 info using node@v12.10.0 4 verbose config Skipping project config: /root/.npmrc. (matches userconfig) 5 verbose stack Error: ENOENT: no such file or directory, open '/root/package.json' 6 verbose cwd /root 7 verbose Linux 2.6.32-358.6.2.el6.x86_64 8 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "start" 9 verbose node v12.10.0 10 verbose npm v6.10.3 11 error code ENOENT 12 error syscall open 13 error path /root/package.json 14 error errno -2 15 error enoent ENOENT: no such file or directory, open '/root/package.json' 16 error enoent This is related to npm not being able to find a file. 17 verbose exit [ -2, true ] |
Google下:https://github.com/visionmedia/debug/issues/261
差不多看了一圈,还判断不出我的问题是啥 ,直接npm install npm@latest -g 下再说
# npm –version
6.11.3
再试,仍然报错,/root/package.json 关键这个文件我没有找到。
结果,,我尼玛 npm init 后一直回车。。它出来了。再次npm start 错误后打开Log:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
0 info it worked if it ends with ok 1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'start' ] 2 info using npm@6.11.3 3 info using node@v12.10.0 4 verbose config Skipping project config: /root/.npmrc. (matches userconfig) 5 verbose stack Error: missing script: start 5 verbose stack at run (/usr/local/lib/node_modules/npm/lib/run-script.js:155:19) 5 verbose stack at /usr/local/lib/node_modules/npm/lib/run-script.js:63:5 5 verbose stack at /usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:116:5 5 verbose stack at /usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:435:5 5 verbose stack at checkBinReferences_ (/usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:391:45) 5 verbose stack at final (/usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:433:3) 5 verbose stack at then (/usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:161:5) 5 verbose stack at ReadFileContext.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:350:20) 5 verbose stack at ReadFileContext.callback (/usr/local/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:115:16) 5 verbose stack at FSReqCallback.readFileAfterOpen [as oncomplete] (fs.js:250:13) 6 verbose cwd /root 7 verbose Linux 2.6.32-358.6.2.el6.x86_64 8 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "start" 9 verbose node v12.10.0 10 verbose npm v6.11.3 11 error missing script: start 12 verbose exit [ 1, true ] |
我日,天书啊 https://stackoverflow.com/questions/31976722/start-script-missing-error-when-running-npm-start
看样子是还需要配置文件呢,尼玛官方对小白不友好。
还是看会国内的文章吧,为了方便 我还是把mongoDb加到环境变量里,打印下Path
# m path
/root/node_modules/mongodb-version-manager/.mongodb/mongodb-current/bin
1 2 3 4 5 6 7 8 9 10 11 12 |
# vim /etc/profile #按i 插入下面 export PATH=/root/node_modules/mongodb-version-manager/.mongodb/mongodb-current/bin:${PATH} #按Esc - Shift + 冒号 - wq - 回车 保存退出 # source /etc/profile #生效 #随便一个目录 # mongo -version MongoDB shell version: 3.2.5 |
全局变量加好,发现了以下奇迹,下面这个目录比起上面变了。但是我找不到这个目录,啥意思???
# m path
/root/.mongodb/versions/mongodb-current/bin
吃午饭了,再见
下午两点连服务器,灵异事件发生:
# m path
/root/node_modules/mongodb-version-manager/.mongodb/mongodb-current/bin
算了算了不管了,,直接下一位,我的下一个目标应该是开启MongoDB,但是官方也没说要不要启动。妹的
找了一个国内的网 https://www.jianshu.com/p/a3c5d253eebc 先看看流程对应到哪里了
但是之前我走了这一步(官方的)设置好app Name,自动生成了app id 和 masterkey
sh <(curl -fsSL https://raw.githubusercontent.com/parse-community/parse-server/master/bootstrap.sh)
看这文章,应该还是给了一个config ,然后npm这个配置表就OK
我找了个目录,创建了json
vi xxxx.json
交配置了之下
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
<code class=" language-cpp">{ "appId": "appid1", "masterKey": "mk1", "appName": "test1", "databaseURI": "mongodb://username:password@xx.xx.xx.xx:27017/dbname" }<br></code> # 安装parse-server # npm install -g parse-server # 尝试 # parse-server xxxx.json <br>[20391] parse-server running on http://localhost:1337/parse 光标在这里了- 我日,我要一直挂在这里吗? contol c 退出得了,还是安个可视化,不然太虚 # npm install -g parse-dashboard #安装这么多,我20G的阿里云还有空间吗??祈祷下! 十分钟过去了。。。尼玛,,是断线了吗 # npm install -g parse-dashboard npm WARN deprecated core-js@1.2.7: core-js@<2.6.8 is no longer maintained. Please, upgrade to core-js@3 or at least to actual version of core-js@2. npm WARN deprecated cryptiles@4.1.2: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial). npm WARN deprecated boom@7.3.0: This module has moved and is now available at @hapi/boom. Please update your dependencies as this version is no longer maintained an may contain bugs and security issues. npm WARN deprecated hoek@6.1.3: This module has moved and is now available at @hapi/hoek. Please update your dependencies as this version is no longer maintained an may contain bugs and security issues. npm WARN deprecated bfj-node4@5.3.1: Switch to the `bfj` package for fixes and new features! /usr/local/bin/parse-dashboard -> /usr/local/lib/node_modules/parse-dashboard/bin/parse-dashboard > core-js@2.6.9 postinstall /usr/local/lib/node_modules/parse-dashboard/node_modules/babel-runtime/node_modules/core-js > node scripts/postinstall || echo "ignore" Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library! The project needs your help! Please consider supporting of core-js on Open Collective or Patreon: > https://opencollective.com/core-js > https://www.patreon.com/zloirock Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -) > core-js-pure@3.2.1 postinstall /usr/local/lib/node_modules/parse-dashboard/node_modules/core-js-pure > node scripts/postinstall || echo "ignore" Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library! The project needs your help! Please consider supporting of core-js on Open Collective or Patreon: > https://opencollective.com/core-js > https://www.patreon.com/zloirock Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -) > styled-components@4.4.0 postinstall /usr/local/lib/node_modules/parse-dashboard/node_modules/styled-components > node ./scripts/postinstall.js || exit 0 Use styled-components at work? Consider supporting our development efforts at https://opencollective.com/styled-components npm WARN codemirror-graphql@0.6.12 requires a peer of graphql@^0.10.0 || ^0.11.0 || ^0.12.0 but none is installed. You must install peer dependencies yourself. npm WARN graphql-language-service-interface@1.3.2 requires a peer of graphql@^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 but none is installed. You must install peer dependencies yourself. npm WARN graphql-language-service-utils@1.2.2 requires a peer of graphql@^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 but none is installed. You must install peer dependencies yourself. npm WARN graphql-config@2.0.1 requires a peer of graphql@^0.11.0 || ^0.12.0 || ^0.13.0 but none is installed. You must install peer dependencies yourself. npm WARN graphql-import@0.4.5 requires a peer of graphql@^0.11.0 || ^0.12.0 || ^0.13.0 but none is installed. You must install peer dependencies yourself. npm WARN graphiql@0.11.11 requires a peer of graphql@^0.6.0 || ^0.7.0 || ^0.8.0-b || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 but none is installed. You must install peer dependencies yourself. npm WARN react-codemirror@1.0.0 requires a peer of react@>=15.5 <16 but none is installed. You must install peer dependencies yourself. npm WARN react-codemirror@1.0.0 requires a peer of react-dom@>=15.5 <16 but none is installed. You must install peer dependencies yourself. + parse-dashboard@2.0.3 |
看样子是装上了,下一步又是加配置表
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
# vi xxxx.json { "apps": [ { "serverURL": "http://localhost:1337/parse", "appId": "myAppId", "masterKey": "myMasterKey", "appName": "MyApp" } ] } # parse-dashboard xxxx.json --arrowInsecureHTTP Iconsfolder at path: /usr/local/lib/node_modules/parse-dashboard/Parse-Dashboard/icons not found! The dashboard is now available at http://0.0.0.0:4040/ #我擦Icons 没有找到?图标?? |
换个网址得了,感觉写得不明不白
从开始部署到现在已经有2天了,给我的感觉是大部分的博客与文章都没有办法让你直接进行开发,也就是门槛高。其中遇到各种错误问题,都需要加一条支线去先解决这种问题,目前貌似也没有比较好的办法,想要优化流程,还是得找专业一点的文章,或者直接找专业一点的人,同时这篇文章或人还得具备专业的表达能力。 太,,,难了。这还没有完,遇到从来就没有Linux经验的人,还得介绍基础知识,一些操作就会让你花上不少时间,太,,,难了。
换回来说,假如我做完之后,这篇文章不去修饰一下也会晦涩难懂,但是这个过程已经折腾了我很大部分精力,我还会转回来修改这篇文章吗? 我相信很多博主也是这样的情况。另一种情况则不是一边做一边写文章,有的博主是已经部署完成之后,凭着记忆,写了出来,有时候有些遗漏自己也不知道。
确实难,之前搭ssr就有一键脚本,也同样是服务器上。就算这个还要复杂一些,那也会有简短之路,关键是这条路有人路没有人记录,可惜。前路漫漫,加油罗。
时候不早,今天先到这里了,还会继续,下次再见。
你好请问你搭建成功了吗?
成功了呀
不好意思老哥,今天上博客以看发现回复了。先感谢一般。那个。。。老哥可否给个联系方式,求教在Centos上安装。求指点
求老哥教在服务器搭建
搭建出来进控制面板,是空白的