DB 마이그레이션이 성공되었는지 확인하기 가장 좋은 방법은 parse-dashboard 를 설치하는 것이다.

https://dashboard.parse.com/apps 과 거의 동일한 대시보드를 만들 수 있다.

레이아웃은 동일하지만, 기능은 아직...


아래 설치 방법의 결과는 모두 동일하다. 아무거나 초이스.


- https://github.com/ParsePlatform/parse-dashboard

- https://www.npmjs.com/package/parse-dashboard

- http://blog.parse.com/announcements/introducing-the-parse-server-dashboard/



1. nodejs & npm 설치


Node.js 버전 4.3 이상을 요구하므로 4.x 로 설치한다.

함께 설치되는 npm 도 최신버전으로 업데이트한다.


# curl -sL https://deb.nodesource.com/setup_4.x | bash -
# apt-get install -y nodejs
# npm install npm -g
# nodejs -v
v4.4.0
# npm -v
3.8.1
cs



2. parse-dashboard 설치 / 설정


# npm install -g parse-dashboard
cs


위와 같이 npm 글로벌 설치를 하면 /usr/lib/node_modules/parse-dashboard 가 홈디렉토리가 된다.

대시보드에 나타낼 앱들에 대한 설정 파일은 parse-dashboard 디렉토리의 Parse-Dashboard/parse-dashboard-config.json 에 있지만, npm update 시 삭제될 수 있으므로, parse-dashboard 디렉토리 밖에 저장한다.

그리고 설정 파일에는 appId, masterKey, appName 등을 다음과 같이 설정한다.


# vi /usr/lib/node_modules/parse-dashboard-config.json
{
  "apps": [
    {
      "serverURL""http://parse-server-ip:1337/parse",
      "appId""xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
      "masterKey""xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
      "appName""OopsProject"
    },
    ...
  ],
  "users": [
    {
      "user":"loginusername",
      "pass":"loginuserpass"
    },
    ...
  ]
}
cs


apps 의 serverURL 은 새로 생성한 parse-server 의 URL 이며,

appId 와 masterKey 는 https://dashboard.parse.com/apps 대시보드의 [App Settings - Security & Keys] 메뉴에 설정된 값을 가져오면 된다.

users 는 현재 구축중인 대시보드에 로그인할 수 있는 정보를 세팅한다.

apps 와 users 모두 여러 개를 등록할 수 있다.



3. parse-dashboard 실행


대시보드 실행할 때는 위에 설정한 config 파일을 매개변수로 전달해야 하며, https 접속이 아니라면 --allowInsecureHTTP=1 매개변수도 전달한다.

파스 대시보드는 기본적으로 4040 포트를 이용하지만 80 포트로 사용하고 싶다면 --port 80 매개변수를 전달한다.

다른 웹서버와 포트가 겹친다면 둘 중 하나는 다른 포트를 사용하던지 사용 중지를 한다.


# parse-dashboard --config /usr/lib/node_modules/parse-dashboard/Parse-Dashboard/parse-dashboard-config.json --allowInsecureHTTP=1 --port 80
The dashboard is now available at http://localhost:80/
cs


이제 해당 주소에 접속하고 로그인하면 위에 설정한 parse 앱들이 나타난다.






WRITTEN BY
손가락귀신
정신 못차리면, 벌 받는다.

,