BetterReplit and Readme
This commit is contained in:
parent
228a7ed4b6
commit
08833ab4b0
3 changed files with 17 additions and 4 deletions
3
.replit
3
.replit
|
|
@ -1,2 +1,3 @@
|
||||||
language = "nodejs"
|
language = "nodejs"
|
||||||
run = "bash main.sh"
|
run = "./main.sh"
|
||||||
|
onBoot = "chmod u+x main.sh"
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,8 @@ $ npm start
|
||||||
|
|
||||||
## Replit Setup Guide
|
## Replit Setup Guide
|
||||||
|
|
||||||
To setup on Replit, first click on the "Run on Replit" button. After loading into your repl, run the following commands:
|
To setup on Replit, first click on the "Run on Replit" button. After loading into your repl, click on the green "Run" button. Alternatively, run the following commands:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
$ npm install
|
$ npm install
|
||||||
$ chmod +x main.sh
|
$ chmod +x main.sh
|
||||||
|
|
|
||||||
15
main.sh
15
main.sh
|
|
@ -1,2 +1,13 @@
|
||||||
git submodule update --init
|
#!/bin/bash
|
||||||
npm start
|
# Set this to 1 to automatically attempt a fix when an error occurs while running npm start.
|
||||||
|
fix=0
|
||||||
|
|
||||||
|
|
||||||
|
# Stuff to do at first run(submodule, npm install).
|
||||||
|
if [[ -d "static" && -n "$(find static -prune -empty 2>/dev/null)" ]] || [[ ! -d "static" ]]; then
|
||||||
|
npm install
|
||||||
|
git submodule update --init --recursive
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
npm start || [[ $fix = 1 ]] && npm install && npm update && git submodule update --init --recursive
|
||||||
Loading…
Add table
Reference in a new issue