Closed leo-smi closed 4 months ago
@leo-smi I can take care of linux. Can you create a .bat
for the windows?
@leo-smi I can take care of linux. Can you create a
.bat
for the windows?
sure
@leo-smi I can take care of linux. Can you create a
.bat
for the windows?sure
Thanks. BTW, don't we have to include the python package installation here?
cd client
start cmd /k "npm install & start http://localhost:5174/ & npm start"
cd ../server
start cmd /k "flask run"
pause
@leo-smi I can take care of linux. Can you create a
.bat
for the windows?sure
Thanks. BTW, don't we have to include the python package installation here?
cd client start cmd /k "npm install & start http://localhost:5174/ & npm start" cd ../server start cmd /k "flask run" pause
yes, I will do some tests for requiremtns.txt.
lmao I'm a newbie to git
BTW here is the code for bat file:
filename: RUN_ON_WINDOWS.bat
cd client
start cmd /k "npm install & start http://localhost:5174/ & npm start"
cd ../server
start cmd /k "pip install -r requirements.txt & flask run"
pause
Thanks for the code. You have to create a branch and make a commit there.
@leo-smi Can you check If this code works in windows?
cd client
start cmd /k "npm install && start http://localhost:5174/ && npm start"
cd ../server
IF NOT EXIST venv (
python -m venv venv
)
start cmd /k "call venv\Scripts\activate && pip install -r requirements.txt && flask run"
pause
cd client start cmd /k "npm install && start http://localhost:5174/ && npm start" cd ../server IF NOT EXIST venv ( python -m venv venv ) start cmd /k "call venv\Scripts\activate && pip install -r requirements.txt && flask run" pause
sure, I will try it.
@leo-smi Can you check If this code works in windows?
cd client start cmd /k "npm install && start http://localhost:5174/ && npm start" cd ../server IF NOT EXIST venv ( python -m venv venv ) start cmd /k "call venv\Scripts\activate && pip install -r requirements.txt && flask run" pause
kind worked but I have no idea why the script changed the port to 5173
the env worked fine
@leo-smi Can you check If this code works in windows?
cd client start cmd /k "npm install && start http://localhost:5174/ && npm start" cd ../server IF NOT EXIST venv ( python -m venv venv ) start cmd /k "call venv\Scripts\activate && pip install -r requirements.txt && flask run" pause
kind worked but I have no idea why the script changed the port to 5173
@leo-smi The npm start
command starts the application using port 5173
which is defined here. Think we can remove the start http://localhost:5174/
.
Can you check one more time with below code?
cd client
start cmd /k "npm install && npm start"
cd ../server
IF NOT EXIST venv (
python -m venv venv
)
start cmd /k "call venv\Scripts\activate && pip install -r requirements.txt && flask run"
pause
@leo-smi The
npm start
command starts the application using port5173
which is defined here. Think we can remove thestart http://localhost:5174/
.
Can we keep like below? the code is to open the browser page. Once the port will not change I think is a gain time.
cd client
start cmd /k "npm install && start http://localhost:5173/ && npm start"
cd ../server
IF NOT EXIST venv (
python -m venv venv
)
start cmd /k "call venv\Scripts\activate && pip install -r requirements.txt && flask run"
pause
The server page keeps loading and don't open. Now the server is running at http://localhost:5174/ . So you can remove the line start http://localhost:5173/
for now. For some reason the port keep changing.
cd client
start cmd /k "npm install && npm start"
cd ../server
IF NOT EXIST venv (
python -m venv venv
)
start cmd /k "call venv\Scripts\activate && pip install -r requirements.txt && flask run"
pause
Is there a way to kill the client when closing the prompt? I have two clients running at http://localhost:5175/ and http://localhost:5174/ and I think there's a third running at http://localhost:5173/
This code should do the job.
cd client
npm install
start "Client" cmd /c "npm start"
cd ../server
IF NOT EXIST venv (
python -m venv venv
)
call venv\Scripts\activate
pip install -r requirements.txt
start "Server" cmd /c "flask run"
pause
taskkill /FI "WINDOWTITLE eq Client"
taskkill /FI "WINDOWTITLE eq Server"
This code should do the job.
cd client npm install start "Client" cmd /c "npm start" cd ../server IF NOT EXIST venv ( python -m venv venv ) call venv\Scripts\activate pip install -r requirements.txt start "Server" cmd /c "flask run" pause taskkill /FI "WINDOWTITLE eq Client" taskkill /FI "WINDOWTITLE eq Server"
Did not work. The prompts windows just closed all.
I tried a lot of codes and nothing is working properly. Once the node task is killed, opening a new client do not load the webpage. Even finding the specific PID of the client port.
I suggest removing the batch files for now and open to the future as a project.
If you want to keep the linux batch is up to you.
Thanks!
Thanks for trying. I'm removing both the script for now as it doesn't make sense to have support for one but not for other.
Is your feature request related to a problem? Please describe.
Describe the solution you'd like
PS: I can't try a batch file for linux for now...