The Parse Server instance for Island.
Parse Server is a backend platform written in Node that can be deployed anywhere and includes out of the box support for common things like object storage, push notifications, basic authentication, file storage, etc. It's backed by MongoDB and you can use a variety of solutions for large file storage.
git clone
this repository and runnpm install
.- Install MongoDB.
- Ensure that there's a MongoDB instance running on your computer (Windows and macOS). You'll need to do this every time you want to run this server locally, or else it won't be able to connect to the database and it won't start. If you want, use MongoDB Atlas or some other MongoDB service to create a hosted Mongo instance and then set the
DATABASE_URI
config to the URL for it. npm start
. You'll see that the script will print out a bunch of errors and then abort. You're missing some config variables. To fix this, create a new file in the root of the project called.env
, and add the config variables the script says to add. Some are optional and the log statements are just warnings. Others are required. All config variables can be added to your.env
in the formatKEY="VALUE"
.
npm start
: Compiles the TypeScript and starts the server. Do not usenode dist/index.js
to start the server. Use this instead.npm run clean
: Deletes thedist
directory to make sure that the next run uses freshly compiled code.
Read the Cloud Functions sections of the guides (Android and iOS) to learn how to call Cloud Functions from the client SDKs. We use Cloud Functions to do privileged things that we can't trust client apps to do. The following Cloud Functions are implemented:
requestVerificationCode
: Used to request that an auth code be sent to a certain phone number via SMS. To call this function, you need to providephoneNumber
andregion
keys in the JSON body of your API request. The phone number should be sent as the user typed it in, and theregion
should be one of the valid regions supported bylibphonenumber
(You want the Alpha-2 column).completePhoneVerification
: Used to verify an auth code requested withrequestVerificationCode
. To call this function, you need to providephoneNumber
andregion
keys as you do withrequestVerificationCode
, but you also need to provide averificationCode
key containing the verification code the user typed in. ThephoneNumber
you provide will be used to find the code. If verification is successful, a session token will be returned. To finish logging in, you should become the user associated with that session token (Android and iOS).