Run With Shell
Is there a way to make it that if you click the run button it will run a command in the shell because I can only run my project with a command in the shell 'npm run dev'. I can't run this command in the console.
or you can run the command yourself in the shell.
There is, create a file called .replit
, then add this:
run = "npm run dev"
It will run the command npm run dev
every time you click the run button.
Or if you want to run a shell command without needed to click the run button, there's already a tab called Shell
next to the Console
tab. You should see it immediately.
@Wumi4 i dont have a file created .replit, and is it also possible to do it without opening shell? it wont run 24/7 now
@SilentDragonCod Have you read the first sentence? I say you to create the .replit
file, because that file is an optional thing. If you don't know how, on the left of your Repl, there is the file browser, for browsing files of course. At the top of it, you will see a button called Create File
or something like that. click on that, then type the name of it, like .replit
.
And Wdym at and is it also possible to do it without opening shell?
anyway?
sure, use bash
.replit
(configures the run button)main.sh
If you want to run commands, use the shell. There should be a default tab called the shell, or open it using
ctrl shift s