Skip to content

Commit

Permalink
preview & prod script variations
Browse files Browse the repository at this point in the history
  • Loading branch information
BayDevCodes committed Mar 7, 2024
1 parent fb0984e commit a8abf5c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
8 changes: 5 additions & 3 deletions scripts/preview.sh.example
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@ export DISCORD_PUBLIC_KEY="<development Discord application public key>"
export NUXT_PUBLIC_DISCORD_CLIENT_ID="<development Discord application client id>"

# Build and start the production server in development environment
if [ "$1" = "skip-build" ]; then
if [ "$1" != "skip-build" ]; then
echo 'Building project (preview)...'
grep -m 1 "Total size" <(nuxt build) # Wait for second to last line from build process
fi
echo 'Starting server (preview)...'
node .output/server/index.mjs
if [ "$1" != "build-only" ]; then
echo 'Starting server (preview)...'
node .output/server/index.mjs
fi
8 changes: 5 additions & 3 deletions scripts/prod.sh.example
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@ export DISCORD_PUBLIC_KEY="<production Discord application public key>"
export NUXT_PUBLIC_DISCORD_CLIENT_ID="<production Discord application client id>"

# Build and start the production server
if [ "$1" = "skip-build" ]; then
if [ "$1" != "skip-build" ]; then
echo 'Building project...'
grep -m 1 "Total size" <(nuxt build) # Wait for second to last line from build process
fi
echo 'Starting server...'
node .output/server/index.mjs
if [ "$1" != "build-only" ]; then
echo 'Starting server...'
node .output/server/index.mjs
fi

0 comments on commit a8abf5c

Please sign in to comment.