bddy
November 6, 2022, 4:06pm
1
Hello people, i’m having trouble with .replit.
I’m attempting to run 2 commands at once, at the same time. I need both of them. Pocketbase is the backend, and vite is the frontend. I tried doing this (image below) it runs pocketbase, then stops it then runs vite. Is there any fix for this. I need them both on
Sup, @bddy ! It looks like you need add the compile
value. compile
is basically the same as run
, but it runs before run
, here’s an example:
compile = "echo This is the cow"
run = "cowsay MOOO-"
1 Like
And instead of one ampersand (&) maybe try two (&&)? I have seen a lot of people using that.
1 Like
bddy
November 7, 2022, 11:31am
4
Hey, @RixTheTyrunt ! I need both of them to run at the same time, will this do that?
bddy
November 7, 2022, 11:35am
5
@RixTheTyrunt I tried both of your solutions, none work. They all run pocketbase first, then waits for pocketbase to stop then runs vite.
X4DE
July 10, 2023, 3:37am
6
I’m also facing the same issue. Both vite and pocketbase doesn’t run simultaneously.
Any solution yet ?
May have found a solution, but it looks like it will need to use an external script. Create a Bash script and change run
to sh [scriptname].sh
.
Inside of your Bash script, copy over the following:
./src/lib/pocketbase serve --http 0.0.0.0:8080 &
vite &
wait
This should run the two commands in parallel.
I could only test this using echo
, but it seems to work OK. Let me know if this works out for you guys.
Edit: I just realized how old this topic was. Please make sure to create a new topic rather than replying to extremely old threads in the future.
2 Likes
X4DE
July 10, 2023, 10:02am
8
I’ve tried it earlier, that didn’t work.
Only one of them works at a time for me
Same goes for any WebView Output.
tried combinations : flask, streamlit, pocketbase, vite.