This server based on https://github.com/ParsePlatform/parse-server-example
And all the information in README_original.md should be still valid.
$ npm install -g parse-server mongodb-runner
$ mongodb-runner start
Because we enabled LiveQuery in pocoweb-chat-server, so default npm
installed parse-server
will not work with Web Socket.
So firstly make the dotenv available.
cp env_template .env
Secondly, uncomment variables you want to change, expecially APPLICATION_ID
and REST_API_KEY
.
Then, run the server:
$ npm start
With MongoDB
$ npm install -g mongodb-runner # install globally
$ npm install
The following variable could be recoganized from the shell environment.
cp env_template .env
will do the local trick for you.
$ mongodb-runner start
$ npm start
Registration, Login, Chat
open http://localhost:1337/public/chat.html
To test on localhost, you should set as follows:
- Regist default users: AI and Group
- Replace getAIId() and getGroupId() in store.js@Pocoweb-chat with your local ObjectId AI and Group, you can check them on your local parse-dashboard
- Replace KEY_AI_ID and KEY_AI_GROUP in cloud/main.js with your local ObjectId