-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: add bootstrap script and fix examples
- Loading branch information
Showing
33 changed files
with
151 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
|
||
export const GET = async () => { | ||
console.log(import.meta.env); | ||
return new Response("what", { status: 200 }) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
# Check if an argument is provided | ||
if [ $# -eq 0 ]; then | ||
echo "Please provide a path argument." | ||
echo "Usage: $0 <path>" | ||
exit 1 | ||
fi | ||
|
||
# store project argument | ||
project_arg="$1" | ||
|
||
|
||
# create dist | ||
cd .. | ||
bun install | ||
bun run build | ||
cd examples | ||
|
||
# install dependencies | ||
cd "$project_arg" | ||
pnpm install | ||
cd .. | ||
|
||
# Start ngrok and capture the public URL | ||
ngrok http localhost:3001 --log=stdout > ngrok.log & | ||
NGROK_PID=$! | ||
sleep 5 # Allow some time for ngrok to start | ||
|
||
# Extract the ngrok URL from the logs | ||
ngrok_url=$(grep -o 'url=https://[a-zA-Z0-9.-]*\.ngrok-free\.app' ngrok.log | cut -d '=' -f 2 | head -n1) | ||
export UPSTASH_WORKFLOW_URL=$ngrok_url | ||
|
||
final_path=$ngrok_url | ||
echo "Setup complete. Full URL: $final_path" | ||
echo "ngrok is running. Press Ctrl+C to stop it." | ||
|
||
|
||
# Open the URL in Chrome | ||
if [[ "$OSTYPE" == "darwin"* ]]; then | ||
open "$final_path" | ||
elif [[ "$OSTYPE" == "linux-gnu"* ]]; then | ||
xdg-open "$final_path" | ||
elif [[ "$OSTYPE" == "cygwin" ]]; then | ||
cygstart "$final_path" | ||
elif [[ "$OSTYPE" == "msys" ]]; then | ||
start "$final_path" | ||
elif [[ "$OSTYPE" == "win32" ]]; then | ||
start "$final_path" | ||
else | ||
echo "Unsupported OS type: $OSTYPE" | ||
fi | ||
|
||
# go to project directory | ||
cd "$project_arg" | ||
# pnpm install @upstash/workflow@file:../../dist | ||
|
||
# Start next.js server | ||
pnpm dev | ||
# Wait for ngrok to be manually stopped | ||
wait $NGROK_PID |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#:schema node_modules/wrangler/config-schema.json | ||
name = "qstash-workflow" | ||
name = "upstash-workflow-cf-hono" | ||
main = "src/index.ts" | ||
compatibility_date = "2024-08-15" | ||
compatibility_flags = ["nodejs_compat"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#:schema node_modules/wrangler/config-schema.json | ||
name = "qstash-workflow" | ||
name = "upstash-workflow-cf" | ||
main = "src/index.ts" | ||
compatibility_date = "2024-08-15" | ||
compatibility_flags = ["nodejs_compat"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.