Skip to content

Commit

Permalink
Port 6464, output tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
jamonholmgren committed Nov 29, 2023
1 parent f2ea487 commit 9f40e97
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 4 deletions.
19 changes: 17 additions & 2 deletions src/cli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ YELLOW='\033[1;33m'
RED='\033[0;31m'
DKGRAY='\033[1;30m'
GREEN='\033[0;32m'
CYAN='\033[0;36m'
END='\033[0m' # End Color

function replace_in_file {
Expand Down Expand Up @@ -68,8 +69,12 @@ fi
if [[ $1 == "create" ]]; then
echo "Creating new Qub QB64 website project..."
echo ""
echo -e "${YELLOW}What domain will this be hosted on?${END} ${DKGRAY}(e.g. jamon.dev)${END}"
read DOMAIN

# If $DOMAIN isn't set, ask for it
if [[ -z $DOMAIN ]]; then
echo -e "${YELLOW}What domain will this be hosted on?${END} ${DKGRAY}(e.g. jamon.dev)${END}"
read DOMAIN
fi

# Check for any whitespace in the domain name
if [[ $DOMAIN =~ [[:space:]] ]]; then
Expand Down Expand Up @@ -146,5 +151,15 @@ if [[ $1 == "create" ]]; then
popd
fi

echo ""
echo -e "${GREEN}New QB64 website project created!${END}"
echo ""
echo -e "${YELLOW}Next steps:${END}"
echo ""
echo -e " ${CYAN}cd ${DOMAIN}${END}"
echo -e " ${CYAN}./bin/build${END}"
echo -e " ${CYAN}./app${END}"
echo ""

exit 0
fi
6 changes: 5 additions & 1 deletion template/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ This is a website powered by [QB64](https://www.qb64.org/) and [Qub](https://qub

Run `./bin/install_qb64` to install dependencies.

Run `./bin/serve` to build and run the website locally.
Run `./bin/build` to build the website locally.

Run `./app` once you've built to start the webserver on port 6464.

Visit [http://localhost:6464/](http://localhost:6464/) to view the website.

## Acknowledgements

Expand Down
2 changes: 1 addition & 1 deletion template/app.bas
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Const MAX_HEADER_SIZE = 4096 'bytes

' Const DEFAULT_HOST = "147.182.205.32" ' for hosting
Const DEFAULT_HOST = "localhost" ' for local
Const DEFAULT_PORT = "80"
Const DEFAULT_PORT = "6464"

' Different types of web requests
Const METHOD_HEAD = 1
Expand Down

0 comments on commit 9f40e97

Please sign in to comment.