simple-chatapp
Preview
imgtu.com CDN
https://z3.ax1x.com/2021/04/23/cXRxIA.gif
Github[./preview]
Usage
-
make sure you have node env
-
clone / download project
-
enter folder [chat-page] & [chat-server]
-
install node_modules
-
config site
-
./chat-page/assets/API.ts
// cross-domain or not const needCross: boolean = true; // cross-domain server or same domain server const BASE_PATH: string = needCross ? 'http://sss.sss.sss:sss/' : '/';
-
./chat-server/assets/config.js
module.exports = { // cross-domain or not cross: true, // only cross=true need this property origin: 'http://ccc.ccc.ccc:ccc' }
-
-
open your terminal
cd ./chat-server node ./bin/www
cd ./chat-page # you can build it: yarn build yarn serve
-
open http://192.168.247:8080 (see the real website on your terminal) in your browser(chrome/firefox/...)