Name: wiselike
Owner: g0v
Description: ??? wiselike ???
Created: 2017-03-22 08:44:03.0
Updated: 2018-01-15 12:33:49.0
Pushed: 2018-02-26 10:16:51.0
Homepage: http://wiselike.tw
Size: 503
Language: Vue
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
??? wiselike ???
stall dependencies
install
velop web
dev-web # port 8000
bpack-bundle-analyzer
run build --report #http://127.0.0.1:8888/
nv
env.example .env
en update .env for DISCOURSE_SSO_SECRET, DISCOURSE_API_KEY and DISCOURSE_API_USERNAME
velop API proxy (requires .env to be set)
dev-proxy # port 9000
With yarn dev-proxy
, proxy server is serving on http://localhost:9000 by default.
GET https://proxy.wiselike.tw/login
{'sso': '{sso}', 'sig': '{sig}', 'username': '{username}'}
GET https://proxy.wiselike.tw/users
GET https://proxy.wiselike.tw/users/{user}
GET https://proxy.wiselike.tw/me?sso={sso}&sig={sig}
GET https://proxy.wiselike.tw/whoami?sso={sso}&sig={sig}
GET https://proxy.wiselike.tw/users/{user}/wisdoms
POST https://proxy.wiselike.tw/users/{user}/wisdoms?sso={sso}&sig={sig}
?title={title}&raw={raw}
POST https://proxy.wiselike.tw/users/{user}/wisdoms/topic?sso={sso}&sig={sig}
POST https://proxy.wiselike.tw/users/{user}/createprofile?sso={sso}&sig={sig}
sso
and sig
should keep private, after signing in through the proxy /login
API, browser stores sso
and sig
in Localstroage. You should pass sso
and sig
to proxy APIs on all user-specific operations.username
was stored in localStorage too after signing in. However, please use username
only for display purpose, never trust its value.node build/build.js
pm2 start ./ecosystem.config.js
(After Discourse v1.9.3 change [slug generation method] setting from 'none' to 'ascii'.)