-
With Docker
. ./exportEnv.sh
make install
-
Without Docker
-
. ./exportEnv.sh
-
`sh exportEnv.sh
-
server
cd server
npm install --force
node serer.js
-
client
cd client
npm install --force
npm run dev $CHAT_CLIENT_PORT
-
- create file
exportEnv.sh
- add model code below on
exportEnv.sh
- fix environment variables
- execute script
sh exportEnv.sh
# cat ./exportEnv.sh
export CHAT_CLIENT_PORT=<changeMe!> # default value 5173
export CHAT_SERVER_PORT=<changeMe!> # default value 3001
export ALIAS_CHAT_APP=<changeMe!> # default value ./
VITE_host=<changeMe!> # default localhost
VITE_scheme=<changeMe!> # default http
echo CHAT_SERVER_PORT=$CHAT_SERVER_PORT > server/.env.local
echo VITE_chat_server_port=$CHAT_SERVER_PORT > client/.env.local
echo VITE_host=$VITE_host >> client/.env.local
echo VITE_scheme=$VITE_scheme >> client/.env.local
exportEnv.sh
and execute the script . ./exportEnv.sh
🚨: when you change port number, you have to export your variables . ./exportEnv.sh
-
open your browser on
http://localhost:5173/
-
open an other browser on
http://localhost:5173/
-
server page help
http://localhost:3001
-
- [email protected] / maher
- [email protected] / tata
- [email protected] / toto
- [email protected] / titi
make deploy
⚠️ if you setALIAS_CHAT_APP
onexportEnv.sh
, callmake deploy ALIAS_CHAT_APP=$ALIAS_CHAT_APP
index.html
located ondist
directory