Skip to content

2016微软云上黑客松比赛项目代码,服务器端。

Notifications You must be signed in to change notification settings

pocoweb/pocochat-server

Repository files navigation

pocoweb-chat-server

This server based on https://github.com/ParsePlatform/parse-server-example

And all the information in README_original.md should be still valid.

Quickstart

$ 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

Install

With MongoDB

$ npm install -g mongodb-runner  # install globally
$ npm install

Environment

The following variable could be recoganized from the shell environment.

cp env_template .env will do the local trick for you.

Run

$ mongodb-runner start
$ npm start

Test

Registration, Login, Chat

open http://localhost:1337/public/chat.html

Debug

To test on localhost, you should set as follows:

  1. Regist default users: AI and Group
  2. 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
  3. Replace KEY_AI_ID and KEY_AI_GROUP in cloud/main.js with your local ObjectId

Deploy

About

2016微软云上黑客松比赛项目代码,服务器端。

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published