Skip to content

Commit

Permalink
Merge pull request titaniumnetwork-dev#27 from Rockpods/main
Browse files Browse the repository at this point in the history
BetterReplit and Readme
  • Loading branch information
caracal-js authored Mar 27, 2022
2 parents 228a7ed + 08833ab commit c5266da
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .replit
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
language = "nodejs"
run = "bash main.sh"
run = "./main.sh"
onBoot = "chmod u+x main.sh"
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ $ npm start

## 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
$ npm install
$ chmod +x main.sh
Expand Down
15 changes: 13 additions & 2 deletions main.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,13 @@
git submodule update --init
npm start
#!/bin/bash
# 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

0 comments on commit c5266da

Please sign in to comment.