skygear/react-chat-demo app.html 无效

skygear/react-chat-demo app.html not work

我在

上遵循了 Skygear 手册
https://docs.skygear.io/guides/advanced/server/

成功启动skygear-server-darwin-amd64

所以我尝试 运行 react-chat-demo

https://github.com/skygear-demo/react-chat-demo

我被设置了端点http://localhost:3000/

当 运行 npm 启动时,我的网络浏览器打开了 file:///Users/~/react-chat-demo-master/demo/login.html

我可以注册并登录 然后 app.html 加载但什么也没看到

它是如何工作的app.html?

#####################################################################
server log

DEBU[0057] OPTIONS /auth/signup                          logger=router
DEBU[0057] ------ Header: ------                         logger=router
DEBU[0057] Access-Control-Request-Method: [POST]         logger=router
DEBU[0057] Accept: [*/*]                                 logger=router
DEBU[0057] Accept-Language: [ko-KR,ko;q=0.8,en-US;q=0.6,en;q=0.4]  logger=router
DEBU[0057] Connection: [keep-alive]                      logger=router
DEBU[0057] Origin: [null]                                logger=router
DEBU[0057] User-Agent: [Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36]  logger=router
DEBU[0057] Access-Control-Request-Headers: [content-type, x-skygear-access-token, x-skygear-api-key]  logger=router
DEBU[0057] Accept-Encoding: [gzip, deflate, sdch, br]    logger=router
DEBU[0057] ------ Request: ------                        logger=router
DEBU[0057] 0 bytes of request body                       logger=router
DEBU[0057] CORS Method: POST                             logger=router
DEBU[0057] CORS Headers: content-type, x-skygear-access-token, x-skygear-api-key  logger=router
DEBU[0057] ------ Response: ------                       logger=router
DEBU[0057] 0 bytes of response body                      logger=router
DEBU[0057] POST /auth/signup                             logger=router
DEBU[0057] ------ Header: ------                         logger=router
DEBU[0057] Connection: [keep-alive]                      logger=router
DEBU[0057] Content-Length: [355]                         logger=router
DEBU[0057] Accept: [application/json]                    logger=router
DEBU[0057] Origin: [null]                                logger=router
DEBU[0057] X-Skygear-Access-Token: [eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJlYTYwYTgyZi0yYmU4LTQ4ZGEtYjhiNi01Mjg0NjUwYmM5YjciLCJpYXQiOjE0ODk2NDc3OTIsImlzcyI6Il8iLCJzdWIiOiJmMzM4MjI1OC0xYTFlLTQ4NWYtODFmMy1jOTM5NzM2NWE5NjAifQ.1k0dMAvr4Ird_cQVKzdicv3e4iSi_J1odapBbnLDfh0]  logger=router
DEBU[0057] X-Skygear-Api-Key: [changeme]                 logger=router
DEBU[0057] User-Agent: [Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36]  logger=router
DEBU[0057] Content-Type: [application/json]              logger=router
DEBU[0057] Accept-Encoding: [gzip, deflate, br]          logger=router
DEBU[0057] Accept-Language: [ko-KR,ko;q=0.8,en-US;q=0.6,en;q=0.4]  logger=router
DEBU[0057] ------ Request: ------                        logger=router
DEBU[0057] {"action":"auth:signup","api_key":"changeme","access_token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJlYTYwYTgyZi0yYmU4LTQ4ZGEtYjhiNi01Mjg0NjUwYmM5YjciLCJpYXQiOjE0ODk2NDc3OTIsImlzcyI6Il8iLCJzdWIiOiJmMzM4MjI1OC0xYTFlLTQ4NWYtODFmMy1jOTM5NzM2NWE5NjAifQ.1k0dMAvr4Ird_cQVKzdicv3e4iSi_J1odapBbnLDfh0","username":"qldrha","email":null,"password":"qldrha"}  logger=router
DEBU[0057] Opening DBConn: {pq _ postgresql://postgres:@localhost/postgres?sslmode=disable}  logger=preprocessor
DEBU[0057] Get DB OK                                     logger=preprocessor
DEBU[0057] Executed SQL successfully with sql.Queryx     args=[] error=<nil> executionCount=1 logger=skydb sql=SELECT id FROM "app__"."_role" WHERE by_default = true
DEBU[0057] 0xc420290500: Beginning transaction           logger=skydb
DEBU[0057] 0xc420290500: Done beginning transaction 0xc420223b30  logger=skydb
DEBU[0057] Executed SQL successfully with sql.Exec       args=[29b406e5-5780-4d7d-92b7-541aa0a3e608 0xc42016ac10 <nil> [36 50 97 36 49 48 36 71 122 75 80 69 76 68 112 81 56 105 100 85 118 57 65 101 76 122 103 114 101 71 71 109 120 90 68 86 121 121 99 88 114 85 105 68 85 103 119 76 117 121 51 48 80 108 48 115 106 51 78 71] {AuthInfo:map[] Valid:true} 2017-03-16 10:41:05.779255568 +0000 UTC 2017-03-16 10:41:05.810086603 +0000 UTC 2017-03-16 10:41:05.810086603 +0000 UTC] error=<nil> executionCount=2 logger=skydb rowsAffected=1 sql=INSERT INTO "app__"."_user" (id,username,email,password,auth,token_valid_since,last_login_at,last_seen_at) VALUES (,,,,,,,)
DEBU[0057] UpdateRoles &{29b406e5-5780-4d7d-92b7-541aa0a3e608 qldrha  [36 50 97 36 49 48 36 71 122 75 80 69 76 68 112 81 56 105 100 85 118 57 65 101 76 122 103 114 101 71 71 109 120 90 68 86 121 121 99 88 114 85 105 68 85 103 119 76 117 121 51 48 80 108 48 115 106 51 78 71] [] map[] 2017-03-16 10:41:05.779255568 +0000 UTC 2017-03-16 10:41:05.810086603 +0000 UTC 2017-03-16 10:41:05.810086603 +0000 UTC}  logger=skydb
DEBU[0057] Executed SQL successfully with sql.Exec       args=[29b406e5-5780-4d7d-92b7-541aa0a3e608] error=<nil> executionCount=3 logger=skydb rowsAffected=0 sql=DELETE FROM "app__"."_user_role" WHERE user_id = 
DEBU[0057] Querying remoteColumnTypes user               logger=skydb
DEBU[0057] Executed SQL with sql.QueryRowx               args=[user app__] executionCount=4 logger=skydb sql=
SELECT c.oid
FROM pg_catalog.pg_class c
     LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace
WHERE c.relname = 
  AND n.nspname = 
DEBU[0057] Executed SQL successfully with sql.Queryx     args=[18085] error=<nil> executionCount=5 logger=skydb sql=
SELECT a.attname,
  pg_catalog.format_type(a.atttypid, a.atttypmod)
FROM pg_catalog.pg_attribute a
WHERE a.attrelid =  AND a.attnum > 0 AND NOT a.attisdropped
DEBU[0057] Executed SQL successfully with sql.Queryx     args=[app__ user] error=<nil> executionCount=6 logger=skydb sql=SELECT kcu.column_name, ccu.table_name FROM information_schema.table_constraints AS tc JOIN information_schema.key_column_usage AS kcu ON tc.constraint_name = kcu.constraint_name JOIN information_schema.constraint_column_usage AS ccu ON ccu.constraint_name = tc.constraint_name WHERE constraint_type = 'FOREIGN KEY' AND tc.table_schema =  AND tc.table_name = 
DEBU[0057] Cache remoteColumnTypes user                  logger=skydb
DEBU[0057] Executed SQL with sql.QueryRowx               args=[ 29b406e5-5780-4d7d-92b7-541aa0a3e608] executionCount=7 logger=skydb sql=SELECT "user"."_updated_at" as "_updated_at", "user"."displayName" as "displayName", "user"."_id" as "_id", "user"."_access" as "_access", "user"."_created_at" as "_created_at", "user"."_updated_by" as "_updated_by", "user"."_database_id" as "_database_id", "user"."_owner_id" as "_owner_id", "user"."_created_by" as "_created_by" FROM "app__"."user" WHERE "user"."_database_id" =  AND _id = 
DEBU[0057] Executed SQL successfully with sql.Queryx     args=[user] error=<nil> executionCount=8 logger=skydb sql=SELECT role_id FROM "app__"."_record_creation" JOIN "app__"."_role" ON "app__"."_record_creation".role_id = id WHERE record_type = 
DEBU[0057] map[]                                         logger=handler
DEBU[0057] Using cached remoteColumnTypes user           logger=skydb
DEBU[0057] Using cached remoteColumnTypes user           logger=skydb
DEBU[0057] Executed SQL with sql.QueryRowx               args=[29b406e5-5780-4d7d-92b7-541aa0a3e608  2017-03-16 10:41:05.926657673 +0000 UTC 29b406e5-5780-4d7d-92b7-541aa0a3e608 [] 29b406e5-5780-4d7d-92b7-541aa0a3e608 29b406e5-5780-4d7d-92b7-541aa0a3e608 2017-03-16 10:41:05.926657673 +0000 UTC] executionCount=9 logger=skydb sql=

WITH updated AS (

        UPDATE "app__"."user"
        SET ("_updated_at", "_updated_by", "_access") = (,,)
        WHERE "_id" =  AND "_database_id" = 
        RETURNING *

), inserted AS (
    INSERT INTO "app__"."user"
        ("_id", "_database_id", "_updated_at", "_updated_by", "_access", "_created_by", "_owner_id", "_created_at")
    SELECT ,,,,,,,
    WHERE NOT EXISTS (SELECT * FROM updated)
    RETURNING *
)
SELECT * FROM updated
UNION ALL
SELECT * FROM inserted;

DEBU[0057] 0xc420290500: Committed transaction           logger=skydb
INFO[0057] Received a notify                             logger=skydb pqNotification=&{BePid:601 Channel:record_change Extra:17}
DEBU[0057] ------ Response: ------                       logger=router
DEBU[0057] {"result":{"user_id":"29b406e5-5780-4d7d-92b7-541aa0a3e608","username":"qldrha","access_token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI1ZDdlNjlhNS1kNDNjLTRiMzEtYWY1Zi1jY2Y4MmI5YzNlYzgiLCJpYXQiOjE0ODk2NjA4NjUsImlzcyI6Il8iLCJzdWIiOiIyOWI0MDZlNS01NzgwLTRkN2QtOTJiNy01NDFhYTBhM2U2MDgifQ.rWJq27SakW7brHwpiH0ccBk_-2L-hA9NTloiSBbaMOU","last_login_at":"2017-03-16T10:41:05.810086603Z","last_seen_at":"2017-03-16T10:41:05.810086603Z"}}
  logger=router
DEBU[0057] Ws error websocket: close 1005                logger=pubsub
DEBU[0057] Close ws reader connection 0xc4202681e0       logger=pubsub
DEBU[0057] Close ws writer goroutine 0xc4202681e0        logger=pubsub
DEBU[0057] GET /_/pubsub?api_key=changeme                logger=router
DEBU[0057] ------ Header: ------                         logger=router
DEBU[0057] Upgrade: [websocket]                          logger=router
DEBU[0057] Sec-Websocket-Version: [13]                   logger=router
DEBU[0057] Accept-Language: [ko-KR,ko;q=0.8,en-US;q=0.6,en;q=0.4]  logger=router
DEBU[0057] Sec-Websocket-Extensions: [permessage-deflate; client_max_window_bits]  logger=router
DEBU[0057] Cache-Control: [no-cache]                     logger=router
DEBU[0057] Connection: [Upgrade]                         logger=router
DEBU[0057] Pragma: [no-cache]                            logger=router
DEBU[0057] Origin: [file://]                             logger=router
DEBU[0057] User-Agent: [Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36]  logger=router
DEBU[0057] Accept-Encoding: [gzip, deflate, sdch, br]    logger=router
DEBU[0057] Sec-Websocket-Key: [1DsSXsgqwkGYp5cA5u7cmQ==]  logger=router
DEBU[0057] ------ Request: ------                        logger=router
DEBU[0057] 0 bytes of request body                       logger=router
DEBU[0057] Matched params: []                            logger=router
DEBU[0057] ------ Response: ------                       logger=router
DEBU[0057] 0 bytes of response body                      logger=router
DEBU[0057] Waiting ws message 0xc42017b3b0               logger=pubsub
DEBU[0057] OPTIONS /record/save                          logger=router
DEBU[0057] ------ Header: ------                         logger=router
DEBU[0057] Accept-Encoding: [gzip, deflate, sdch, br]    logger=router
DEBU[0057] Access-Control-Request-Method: [POST]         logger=router
DEBU[0057] Origin: [null]                                logger=router
DEBU[0057] User-Agent: [Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36]  logger=router
DEBU[0057] Access-Control-Request-Headers: [content-type, x-skygear-access-token, x-skygear-api-key]  logger=router
DEBU[0057] Accept: [*/*]                                 logger=router
DEBU[0057] Connection: [keep-alive]                      logger=router
DEBU[0057] Accept-Language: [ko-KR,ko;q=0.8,en-US;q=0.6,en;q=0.4]  logger=router
DEBU[0057] ------ Request: ------                        logger=router
DEBU[0057] 0 bytes of request body                       logger=router
DEBU[0057] CORS Method: POST                             logger=router
DEBU[0057] CORS Headers: content-type, x-skygear-access-token, x-skygear-api-key  logger=router
DEBU[0057] ------ Response: ------                       logger=router
DEBU[0057] 0 bytes of response body                      logger=router
DEBU[0057] POST /record/save                             logger=router
DEBU[0057] ------ Header: ------                         logger=router
DEBU[0057] X-Skygear-Access-Token: [eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI1ZDdlNjlhNS1kNDNjLTRiMzEtYWY1Zi1jY2Y4MmI5YzNlYzgiLCJpYXQiOjE0ODk2NjA4NjUsImlzcyI6Il8iLCJzdWIiOiIyOWI0MDZlNS01NzgwLTRkN2QtOTJiNy01NDFhYTBhM2U2MDgifQ.rWJq27SakW7brHwpiH0ccBk_-2L-hA9NTloiSBbaMOU]  logger=router
DEBU[0057] X-Skygear-Api-Key: [changeme]                 logger=router
DEBU[0057] User-Agent: [Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36]  logger=router
DEBU[0057] Content-Type: [application/json]              logger=router
DEBU[0057] Accept-Encoding: [gzip, deflate, br]          logger=router
DEBU[0057] Accept-Language: [ko-KR,ko;q=0.8,en-US;q=0.6,en;q=0.4]  logger=router
DEBU[0057] Content-Length: [456]                         logger=router
DEBU[0057] Origin: [null]                                logger=router
DEBU[0057] Accept: [application/json]                    logger=router
DEBU[0057] Connection: [keep-alive]                      logger=router
DEBU[0057] ------ Request: ------                        logger=router
DEBU[0057] {"action":"record:save","api_key":"changeme","access_token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI1ZDdlNjlhNS1kNDNjLTRiMzEtYWY1Zi1jY2Y4MmI5YzNlYzgiLCJpYXQiOjE0ODk2NjA4NjUsImlzcyI6Il8iLCJzdWIiOiIyOWI0MDZlNS01NzgwLTRkN2QtOTJiNy01NDFhYTBhM2U2MDgifQ.rWJq27SakW7brHwpiH0ccBk_-2L-hA9NTloiSBbaMOU","database_id":"_public","records":[{"_id":"user/29b406e5-5780-4d7d-92b7-541aa0a3e608","_access":[{"public":true,"level":"read"}],"displayName":"qldrha"}]}  logger=router
DEBU[0057] Opening DBConn: {pq _ postgresql://postgres:@localhost/postgres?sslmode=disable}  logger=preprocessor
DEBU[0057] Get DB OK                                     logger=preprocessor
WARN[0057] 29b406e5-5780-4d7d-92b7-541aa0a3e608          logger=skydb
DEBU[0057] Executed SQL successfully with sql.Queryx     args=[ {"Type":"user"}] error=<nil> executionCount=1 logger=skydb sql=SELECT id, device_id, type, notification_info, query FROM "app__"."_subscription" WHERE user_id =  AND query @> ::jsonb
DEBU[0057] Executed SQL with sql.QueryRowx               args=[29b406e5-5780-4d7d-92b7-541aa0a3e608] executionCount=1 logger=skydb sql=SELECT id, username, email, password, auth, token_valid_since, last_login_at, last_seen_at, array_to_json(array_agg(role_id)) AS roles FROM "app__"."_user" LEFT JOIN "app__"."_user_role" ON id = user_id WHERE id =  GROUP BY id
DEBU[0057] Working with accessModel RoleBasedAccess      logger=handler
DEBU[0057] Querying remoteColumnTypes user               logger=skydb
DEBU[0057] Executed SQL with sql.QueryRowx               args=[user app__] executionCount=2 logger=skydb sql=
SELECT c.oid
FROM pg_catalog.pg_class c
     LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace
WHERE c.relname = 
  AND n.nspname = 
DEBU[0057] Executed SQL successfully with sql.Queryx     args=[18085] error=<nil> executionCount=3 logger=skydb sql=
SELECT a.attname,
  pg_catalog.format_type(a.atttypid, a.atttypmod)
FROM pg_catalog.pg_attribute a
WHERE a.attrelid =  AND a.attnum > 0 AND NOT a.attisdropped
DEBU[0057] Executed SQL successfully with sql.Queryx     args=[app__ user] error=<nil> executionCount=4 logger=skydb sql=SELECT kcu.column_name, ccu.table_name FROM information_schema.table_constraints AS tc JOIN information_schema.key_column_usage AS kcu ON tc.constraint_name = kcu.constraint_name JOIN information_schema.constraint_column_usage AS ccu ON ccu.constraint_name = tc.constraint_name WHERE constraint_type = 'FOREIGN KEY' AND tc.table_schema =  AND tc.table_name = 
DEBU[0057] Cache remoteColumnTypes user                  logger=skydb
DEBU[0057] Executed SQL with sql.QueryRowx               args=[ 29b406e5-5780-4d7d-92b7-541aa0a3e608] executionCount=5 logger=skydb sql=SELECT "user"."_created_by" as "_created_by", "user"."_updated_at" as "_updated_at", "user"."displayName" as "displayName", "user"."_id" as "_id", "user"."_owner_id" as "_owner_id", "user"."_access" as "_access", "user"."_database_id" as "_database_id", "user"."_created_at" as "_created_at", "user"."_updated_by" as "_updated_by" FROM "app__"."user" WHERE "user"."_database_id" =  AND _id = 
DEBU[0057] map[displayName:qldrha]                       logger=handler
DEBU[0057] Using cached remoteColumnTypes user           logger=skydb
DEBU[0057] Using cached remoteColumnTypes user           logger=skydb
DEBU[0057] Executed SQL with sql.QueryRowx               args=[29b406e5-5780-4d7d-92b7-541aa0a3e608  2017-03-16 10:41:06.019357878 +0000 UTC 29b406e5-5780-4d7d-92b7-541aa0a3e608 qldrha [{Relation: Role: Level:read UserID: Public:true}] 2017-03-16 10:41:05.926658 +0000 UTC 29b406e5-5780-4d7d-92b7-541aa0a3e608 29b406e5-5780-4d7d-92b7-541aa0a3e608] executionCount=6 logger=skydb sql=

WITH updated AS (

        UPDATE "app__"."user"
        SET ("_updated_at", "_updated_by", "displayName", "_access") = (,,,)
        WHERE "_id" =  AND "_database_id" = 
        RETURNING *

), inserted AS (
    INSERT INTO "app__"."user"
        ("_id", "_database_id", "_updated_at", "_updated_by", "displayName", "_access", "_created_at", "_created_by", "_owner_id")
    SELECT ,,,,,,,,
    WHERE NOT EXISTS (SELECT * FROM updated)
    RETURNING *
)
SELECT * FROM updated
UNION ALL
SELECT * FROM inserted;

INFO[0057] Received a notify                             logger=skydb pqNotification=&{BePid:601 Channel:record_change Extra:18}
DEBU[0057] ------ Response: ------                       logger=router
DEBU[0057] {"result":[{"_access":[{"level":"read","public":true}],"_created_at":"2017-03-16T10:41:05.926658Z","_created_by":"29b406e5-5780-4d7d-92b7-541aa0a3e608","_id":"user/29b406e5-5780-4d7d-92b7-541aa0a3e608","_ownerID":"29b406e5-5780-4d7d-92b7-541aa0a3e608","_type":"record","_updated_at":"2017-03-16T10:41:06.019358Z","_updated_by":"29b406e5-5780-4d7d-92b7-541aa0a3e608","displayName":"qldrha"}]}
  logger=router
DEBU[0057] Executed SQL successfully with sql.Queryx     args=[ {"Type":"user"}] error=<nil> executionCount=1 logger=skydb sql=SELECT id, device_id, type, notification_info, query FROM "app__"."_subscription" WHERE user_id =  AND query @> ::jsonb
DEBU[0057] Ws error websocket: close 1001                logger=pubsub
DEBU[0057] Close ws reader connection 0xc42017aa50       logger=pubsub
DEBU[0057] Close ws writer goroutine 0xc42017aa50        logger=pubsub
DEBU[0057] Ws error websocket: close 1001                logger=pubsub
DEBU[0057] Close ws reader connection 0xc42017b3b0       logger=pubsub
DEBU[0057] Close ws writer goroutine 0xc42017b3b0        logger=pubsub
DEBU[0057] GET /_/pubsub?api_key=changeme                logger=router
DEBU[0057] ------ Header: ------                         logger=router
DEBU[0057] Origin: [file://]                             logger=router
DEBU[0057] User-Agent: [Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36]  logger=router
DEBU[0057] Accept-Encoding: [gzip, deflate, sdch, br]    logger=router
DEBU[0057] Accept-Language: [ko-KR,ko;q=0.8,en-US;q=0.6,en;q=0.4]  logger=router
DEBU[0057] Connection: [Upgrade]                         logger=router
DEBU[0057] Pragma: [no-cache]                            logger=router
DEBU[0057] Cache-Control: [no-cache]                     logger=router
DEBU[0057] Upgrade: [websocket]                          logger=router
DEBU[0057] Sec-Websocket-Version: [13]                   logger=router
DEBU[0057] Sec-Websocket-Key: [kgfqlbiX8CODkmqyaTnRPA==]  logger=router
DEBU[0057] Sec-Websocket-Extensions: [permessage-deflate; client_max_window_bits]  logger=router
DEBU[0057] ------ Request: ------                        logger=router
DEBU[0057] 0 bytes of request body                       logger=router
DEBU[0057] Matched params: []                            logger=router
DEBU[0057] ------ Response: ------                       logger=router
DEBU[0057] 0 bytes of response body                      logger=router
DEBU[0057] Waiting ws message 0xc4200c2d20               logger=pubsub
DEBU[0057] GET /pubsub?api_key=changeme                  logger=router
DEBU[0057] ------ Header: ------                         logger=router
DEBU[0057] Pragma: [no-cache]                            logger=router
DEBU[0057] Upgrade: [websocket]                          logger=router
DEBU[0057] Sec-Websocket-Version: [13]                   logger=router
DEBU[0057] Accept-Encoding: [gzip, deflate, sdch, br]    logger=router
DEBU[0057] Accept-Language: [ko-KR,ko;q=0.8,en-US;q=0.6,en;q=0.4]  logger=router
DEBU[0057] Connection: [Upgrade]                         logger=router
DEBU[0057] Cache-Control: [no-cache]                     logger=router
DEBU[0057] Origin: [file://]                             logger=router
DEBU[0057] User-Agent: [Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36]  logger=router
DEBU[0057] Sec-Websocket-Key: [mG8XggSpYoOcIOcZ6CByNQ==]  logger=router
DEBU[0057] Sec-Websocket-Extensions: [permessage-deflate; client_max_window_bits]  logger=router
DEBU[0057] ------ Request: ------                        logger=router
DEBU[0057] 0 bytes of request body                       logger=router
DEBU[0057] Matched params: []                            logger=router
DEBU[0057] ------ Response: ------                       logger=router
DEBU[0057] 0 bytes of response body                      logger=router
DEBU[0057] Waiting ws message 0xc4200c2ff0               logger=pubsub

这是因为 https://docs.skygear.io/guides/advanced/server/ 的手册没有涵盖安装聊天插件。

您应该可以在 skygear.io

上试用托管版本的 react-chat-demo

如果您想在自己的机器上部署,聊天插件源位于 https://github.com/skygeario/chat

阅读 docker-compose.yml,您需要:

一个。使用以下环境变量启动 skygear-server:

DATABASE_URL: postgresql://postgres:@db/postgres?sslmode=disable
APP_NAME: my_skygear_app
API_KEY: my_skygear_key
MASTER_KEY: my_master_key
TOKEN_STORE: jwt
TOKEN_STORE_SECRET: my_skygear_jwt_secret

PLUGINS: CHAT
CHAT_TRANSPORT: zmq
CHAT_PATH: chat
CHAT_ARGS: tcp://0.0.0.0:5555

将 CHAT_ARGS 设置为聊天插件的 ip 和端口。

  1. 启动聊天插件如下:

环境变量

DATABASE_URL: postgresql://postgres:@db:5432/postgres?sslmode=disable
PUBSUB_URL: ws://app:3000/pubsub
SKYGEAR_ADDRESS: tcp://app:5555
SKYGEAR_ENDPOINT: http://app:3000
APP_NAME: my_skygear_app
API_KEY: my_skygear_key
MASTER_KEY: my_master_key
TOKEN_STORE_SECRET: my_skygear_jwt_secret
ASSET_STORE_URL_PREFIX: http://localhost:3000/

和 运行 安装 python 模块后此命令:

py-skygear chat