-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Making dapp work on GHCS #47
Merged
Merged
Changes from 15 commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
4e40c13
public-ports-fix-hostname
amessbee 7ecdcac
Update set.hostname.sh
amessbee a598cc4
fix: Updating hostname script to accomodate localhost case
amessbee 3ffdb93
fix: hostname script works on localhost
amessbee 6725059
Add devcontainer.json with public ports
toliaqat fcc492c
Update App.tsx hostname placeholder
amessbee 1f80eab
feat: nvm command in .devcontainer
amessbee af16635
fix: node version
amessbee c85bab1
fix: nvm not working in .devcontainer so remving for now
amessbee cbc1754
feat: Hostname Update with ENV Only - Removed script
amessbee 611e29d
chore: make the api and rpc endpoints dynamic
rabi-siddique 20b9b0e
chore: update dev script in package.json
rabi-siddique ea3e985
chore: use node version 18.20 for the dev container
rabi-siddique dd791bc
Update App.tsx hostname placeholder
amessbee f7efe5d
fix: (probably temporary) added cors header in requests
amessbee 6eba185
fix: comment out ports visibility command in devcontainer
amessbee 813a518
chore: use env for codespace domain instead of hardcoded string
amessbee b56db1f
feat: alternate solution for CORS with GH-token
amessbee 0103bcb
fix: env variable for GH token
amessbee be3f772
fix: devcontainer for ports
amessbee de4dc06
fix: add docker to features
amessbee d7b10ad
fix: port opening
amessbee c89fb32
fix: add gh CLI to features
amessbee 3eeb173
fix: revert to access-control in header
amessbee 3392cca
chore: delete setup not needed anymore
amessbee 7fd9e20
fix: export GHCS domain name
amessbee a467f84
chore: clean devcontainer file
amessbee f0749ab
chore: yarn install in postStartCommand
amessbee 9047c52
chore: readme for ghcs
amessbee fdfe3e7
fix: readme links
amessbee File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"forwardPorts": [5173, 1317, 26657, 26656], | ||
"portsAttributes": { | ||
"5173": { | ||
"label": "UI", | ||
"onAutoForward": "openBrowser" | ||
}, | ||
"1317": { | ||
"label": "API", | ||
"onAutoForward": "silent" | ||
}, | ||
"26657": { | ||
"label": "RPC", | ||
"onAutoForward": "silent" | ||
}, | ||
"26656": { | ||
"label": "P2P", | ||
"onAutoForward": "silent" | ||
} | ||
}, | ||
"postStartCommand": "bash -i -c 'nvm install 18.20 && nvm alias default 18.20' && bash ./make_ports_public.sh 5173 1317 26657" | ||
} |
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,19 @@ | ||
#!/bin/bash | ||
set -x | ||
|
||
# Function to change port visibility to public | ||
change_port_visibility() { | ||
local port=$1 | ||
gh codespace ports visibility $port:public -c $CODESPACE_NAME | ||
} | ||
|
||
# Check if at least one port is provided | ||
if [ $# -eq 0 ]; then | ||
echo "Usage: $0 <port1> [port2 ... portN]" | ||
exit 1 | ||
fi | ||
|
||
# Loop through each provided port and change its visibility to public | ||
for port in "$@"; do | ||
change_port_visibility $port | ||
done |
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rabi-siddique @amessbee I think we need a lot of testing to sure
./make_ports_public.sh 5173 1317 26657
works every time. If there is flakyness then we should address it.