forked from parse-community/parse-server
-
Notifications
You must be signed in to change notification settings - Fork 0
InsideMaps parse server
Marko Matić edited this page Aug 22, 2016
·
1 revision
To fetch newest code from parse-server master branch, first merge it into master:
git checkout master
git fetch upstream
git merge upstream/master
And then merge master into your branch:
git checkout im-parse-master
git merge master
You normally shouldn't merge upstream/master directly to your branch.
cd /parse/home/dir
npm install
npm test spec/TestToRun.spec.js
You can run parse-server from one command line, if you like:
sudo PARSE_SERVER_MOUNT_PATH='/1' \
PARSE_SERVER_CLOUD_CODE_MAIN=/var/www/website/parse-cloud-code/authentication/cloud/main.js \
PARSE_SERVER_REST_API_KEY=yRAhOfRh6B4Bemculwndsmr61nFDruyg4BtOVnw1 \
PARSE_SERVER_DATABASE_URI=mongodb://imadmin:[email protected]:52184/production?ssl=true \
PARSE_SERVER_APPLICATION_ID=mRk93Km1ABcJ4Zr2VeixSYLlCgaPjDhiWWJawJqS \
PARSE_SERVER_MASTER_KEY=4dNuEh0K3DDRj75vScXCGIOZ3Ch7g1pfxkLj4K94 \
PARSE_SERVER_JAVASCRIPT_KEY=lUcy2bkq8YiXXVUc81vSMitiyAm3x1RPAty9tEwa \
PARSE_SERVER_APP_NAME="InsideMaps" \
VERBOSE=true \
./bin/parse-server
Full list of env variables:
PARSE_SERVER_APPLICATION_ID=mRk93Km1ABcJ4Zr2VeixSYLlCgaPjDhiWWJawJqS
PARSE_SERVER_MASTER_KEY=4dNuEh0K3DDRj75vScXCGIOZ3Ch7g1pfxkLj4K94
PORT=1337
PARSE_SERVER_DATABASE_URI=mongodb://imadmin:[email protected]:52184/production?ssl=true
PARSE_SERVER_DATABASE_OPTIONS= mongodb options
PARSE_SERVER_COLLECTION_PREFIX= doesn't work.
PARSE_SERVER_URL=if you want to make parse server bind to only one interface, or domain name
PARSE_PUBLIC_SERVER_URL=public url for email validation (will be sent on validation emails)
PARSE_SERVER_CLIENT_KEY=
PARSE_SERVER_JAVASCRIPT_KEY=lUcy2bkq8YiXXVUc81vSMitiyAm3x1RPAty9tEwa
PARSE_SERVER_REST_API_KEY=yRAhOfRh6B4Bemculwndsmr61nFDruyg4BtOVnw1
PARSE_SERVER_DOT_NET_KEY=
PARSE_SERVER_WEBHOOK_KEY=
PARSE_SERVER_CLOUD_CODE_MAIN=/absolute/path/to/cloud/main.js
PARSE_SERVER_PUSH=
PARSE_SERVER_OAUTH_PROVIDERS=
PARSE_SERVER_FILE_KEY=
PARSE_SERVER_FACEBOOK_APP_IDS=
PARSE_SERVER_ENABLE_ANON_USERS=
PARSE_SERVER_ALLOW_CLIENT_CLASS_CREATION=
PARSE_SERVER_MOUNT_PATH='/1'
PARSE_SERVER_FILES_ADAPTER=
PARSE_SERVER_EMAIL_ADAPTER=
PARSE_SERVER_VERIFY_USER_EMAILS=
PARSE_SERVER_APP_NAME='InsideMaps'
PARSE_SERVER_LOGGER_ADAPTER=
PARSE_SERVER_LIVE_QUERY_OPTIONS=
PARSE_SERVER_CUSTOM_PAGES=
PARSE_SERVER_MAX_UPLOAD_SIZE=
PARSE_SERVER_SESSION_LENGTH=
VERBOSE=false
PARSE_SERVER_REVOKE_SESSION_ON_PASSWORD_RESET=true
PARSE_SERVER_SCHEMA_CACHE_TTL=
Or, you can create config.json and pass it to parse-server:
./bin/parse-server config.json
Full list of config options:
appId <appId> Your Parse Application ID
masterKey <masterKey> Your Parse Master Key
port [port] The port to run the ParseServer. defaults to 1337.
databaseURI [databaseURI] The full URI to your mongodb database
databaseOptions [databaseOptions] Options to pass to the mongodb client
collectionPrefix [collectionPrefix] A collection prefix for the classes
serverURL [serverURL] URL to your parse server with http:// or https://.
publicServerURL [publicServerURL] Public URL to your parse server with http:// or https://.
clientKey [clientKey] Key for iOS, MacOS, tvOS clients
javascriptKey [javascriptKey] Key for the Javascript SDK
restAPIKey [restAPIKey] Key for REST calls
dotNetKey [dotNetKey] Key for Unity and .Net SDK
webhookKey [webhookKey] Key sent with outgoing webhook calls
cloud [cloud] Full path to your cloud code main.js
push [push] Configuration for push, as stringified JSON. See https://github.com/ParsePlatform/parse-server/wiki/Push
oauth [oauth] Configuration for your oAuth providers, as stringified JSON. See https://github.com/ParsePlatform/parse-server/wiki/Parse-Server-Guide#oauth
fileKey [fileKey] Key for your files
facebookAppIds [facebookAppIds] Comma separated list for your facebook app Ids
enableAnonymousUsers [enableAnonymousUsers] Enable (or disable) anon users, defaults to true
allowClientClassCreation [allowClientClassCreation] Enable (or disable) client class creation, defaults to true
mountPath [mountPath] Mount path for the server, defaults to /parse
filesAdapter [filesAdapter] Adapter module for the files sub-system
emailAdapter [emailAdapter] Adapter module for the email sending
verifyUserEmails [verifyUserEmails] Enable (or disable) user email validation, defaults to false
preventLoginWithUnverifiedEmail [preventLoginWithUnverifiedEmail] Prevent user from login if email is not verified and PARSE_SERVER_VERIFY_USER_EMAILS is true, defaults to false
emailVerifyTokenValidityDuration [emailVerifyTokenValidityDuration] Email verification token validity duration
appName [appName] Sets the app name
loggerAdapter [loggerAdapter] Adapter module for the logging sub-system
liveQuery [liveQuery] liveQuery options
customPages [customPages] custom pages for password validation and reset
maxUploadSize [maxUploadSize] Max file size for uploads.
sessionLength [sessionLength] Session duration, defaults to 1 year
verbose [verbose] Set the logging to verbose
jsonLogs [jsonLogs] Log as structured JSON objects
logLevel [logLevel] Sets the level for logs
logsFolder [logsFolder] Folder for the logs (defaults to './logs'); set to null to disable file based logging
silent [silent] Disables console output
revokeSessionOnPasswordReset [revokeSessionOnPasswordReset] When a user changes their password, either through the reset password email or while logged in, all sessions are revoked if this is true. Set to false if you don't want to revoke sessions.
schemaCacheTTL [schemaCacheTTL] The TTL for caching the schema for optimizing read/write operations. You should put a long TTL when your DB is in production. default to 0; disabled.
For debugging you probably want to use iron-node. But if you have some other node-debugger, procedure is the same. Run ./lib/cli/parse-server.js
using command line config, or config.json using iron-node:
sudo PARSE_SERVER_MOUNT_PATH='/1' \
PARSE_SERVER_CLOUD_CODE_MAIN=/var/www/website/parse-cloud-code/authentication/cloud/main.js \
PARSE_SERVER_REST_API_KEY=yRAhOfRh6B4Bemculwndsmr61nFDruyg4BtOVnw1 \
PARSE_SERVER_DATABASE_URI=mongodb://imadmin:[email protected]:52184/production?ssl=true \
PARSE_SERVER_APPLICATION_ID=mRk93Km1ABcJ4Zr2VeixSYLlCgaPjDhiWWJawJqS \
PARSE_SERVER_MASTER_KEY=4dNuEh0K3DDRj75vScXCGIOZ3Ch7g1pfxkLj4K94 \
PARSE_SERVER_JAVASCRIPT_KEY=lUcy2bkq8YiXXVUc81vSMitiyAm3x1RPAty9tEwa \
PARSE_SERVER_APP_NAME="InsideMaps" \
VERBOSE=true \
iron-node ./lib/cli/parse-server.js