Skip to content

Commit

Permalink
Switch localhost development to port 7777. (#4475)
Browse files Browse the repository at this point in the history
* Switch localhost development to port 8888.

* Use 7777 instead

* Also correct port number in settings.py and goldens
  • Loading branch information
jrobbins authored Oct 24, 2024
1 parent da48531 commit 30964ae
Show file tree
Hide file tree
Showing 18 changed files with 30 additions and 30 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ To start the main server and the notifier backend, run:
```bash
npm start
```
Then visit `http://localhost:8080/`.
Then visit `http://localhost:7777/`.

To start front end code watching (sass, js lint check, babel, minify files), run

Expand Down Expand Up @@ -128,7 +128,7 @@ Chromestatus currently gets the list of Blink components from the file `hack_com

#### Seed the blink component owners

Visit http://localhost:8080/admin/blink/populate_blink to see the list of Blink component owners.
Visit http://localhost:7777/admin/blink/populate_blink to see the list of Blink component owners.

#### Debugging / settings

Expand Down
2 changes: 1 addition & 1 deletion framework/cloud_tasks_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def queue_path(self, project, location, queue):
def create_task(self, parent=None, task=None, **kwargs):
"""Immediately hit the target URL."""
uri = task.get('app_engine_http_request').get('relative_uri')
target_url = 'http://localhost:8080' + uri
target_url = 'http://localhost:7777' + uri
body = task.get('app_engine_http_request').get('body')
logging.info('Making request to %r', target_url)
handler_response = requests.request('POST',
Expand Down
2 changes: 1 addition & 1 deletion framework/cloud_tasks_helpers_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def test_create_task(self, mock_fetch):
self.assertIsNone(actual)
mock_fetch.assert_called_once_with(
'POST',
'http://localhost:8080/handler',
'http://localhost:7777/handler',
data=b'{"a": 1}',
allow_redirects=False,
headers={'X-AppEngine-QueueName': 'default'})
Expand Down
2 changes: 1 addition & 1 deletion gen/py/chromestatus_openapi/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ EXPOSE 8080

ENTRYPOINT ["python3"]

CMD ["-m", "chromestatus_openapi"]
CMD ["-m", "chromestatus_openapi"]
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</tr>
<tr>
<td><a style="font-size: 140%;"
href="http://127.0.0.1:8888/feature/123"
href="http://127.0.0.1:7777/feature/123"
>feature template</a>
</td>
</tr>
Expand Down Expand Up @@ -67,7 +67,7 @@
<section id="next-steps" style="margin: 16px; padding: 16px; background: white; border: 2px solid #ccc; border-radius:8px;">
<div><b>Your next steps:</b></div>
<div style="margin: 16px;">
<a href="http://127.0.0.1:8888/feature/123" style="text-decoration: none; font-weight: bold; color: white; background: #01579b; border-radius: 8px; padding: 8px 16px; "
<a href="http://127.0.0.1:7777/feature/123" style="text-decoration: none; font-weight: bold; color: white; background: #01579b; border-radius: 8px; padding: 8px 16px; "
>View feature details</a></div>
</section>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</tr>
<tr>
<td><a style="font-size: 140%;"
href="http://127.0.0.1:8888/feature/123"
href="http://127.0.0.1:7777/feature/123"
>feature template</a>
</td>
</tr>
Expand All @@ -35,7 +35,7 @@
<section id="next-steps" style="margin: 16px; padding: 16px; background: white; border: 2px solid #ccc; border-radius:8px;">
<div><b>Your next steps:</b></div>
<div style="margin: 16px;">
<a href="http://127.0.0.1:8888/feature/123" style="text-decoration: none; font-weight: bold; color: white; background: #01579b; border-radius: 8px; padding: 8px 16px; "
<a href="http://127.0.0.1:7777/feature/123" style="text-decoration: none; font-weight: bold; color: white; background: #01579b; border-radius: 8px; padding: 8px 16px; "
>View feature details</a></div>
</section>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</tr>
<tr>
<td><a style="font-size: 140%;"
href="http://127.0.0.1:8888/feature/123"
href="http://127.0.0.1:7777/feature/123"
>feature template</a>
</td>
</tr>
Expand All @@ -35,7 +35,7 @@
<section id="next-steps" style="margin: 16px; padding: 16px; background: white; border: 2px solid #ccc; border-radius:8px;">
<div><b>Your next steps:</b></div>
<div style="margin: 16px;">
<a href="http://127.0.0.1:8888/feature/123" style="text-decoration: none; font-weight: bold; color: white; background: #01579b; border-radius: 8px; padding: 8px 16px; "
<a href="http://127.0.0.1:7777/feature/123" style="text-decoration: none; font-weight: bold; color: white; background: #01579b; border-radius: 8px; padding: 8px 16px; "
>View feature details</a></div>
</section>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</tr>
<tr>
<td><a style="font-size: 140%;"
href="http://127.0.0.1:8888/feature/1"
href="http://127.0.0.1:7777/feature/1"
>A feature</a>
</td>
</tr>
Expand All @@ -36,7 +36,7 @@
<div><b>Your next steps:</b></div>

<div style="margin: 16px;">
<a href="http://127.0.0.1:8888/feature/1?gate=3&initiateExtension"
<a href="http://127.0.0.1:7777/feature/1?gate=3&initiateExtension"
style="text-decoration: none; font-weight: bold; color: white; background: #01579b; border-radius: 8px; padding: 8px 16px; "
>Finalize trial extension</a></div>
</section>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</tr>
<tr>
<td><a style="font-size: 140%;"
href="http://127.0.0.1:8888/feature/123"
href="http://127.0.0.1:7777/feature/123"
>feature one</a>
</td>
</tr>
Expand Down Expand Up @@ -93,7 +93,7 @@
<div><b>Your next steps:</b></div>

<div style="margin: 16px;">
<a href="http://127.0.0.1:8888/guide/verify_accuracy/123" style="text-decoration: none; font-weight: bold; color: white; background: #01579b; border-radius: 8px; padding: 8px 16px; "
<a href="http://127.0.0.1:7777/guide/verify_accuracy/123" style="text-decoration: none; font-weight: bold; color: white; background: #01579b; border-radius: 8px; padding: 8px 16px; "
>Verify feature accuracy</a></div>
</section>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</tr>
<tr>
<td><a style="font-size: 140%;"
href="http://127.0.0.1:8888/feature/123"
href="http://127.0.0.1:7777/feature/123"
>feature one</a>
</td>
</tr>
Expand Down Expand Up @@ -88,7 +88,7 @@
<div><b>Your next steps:</b></div>

<div style="margin: 16px;">
<a href="http://127.0.0.1:8888/guide/verify_accuracy/123" style="text-decoration: none; font-weight: bold; color: white; background: #01579b; border-radius: 8px; padding: 8px 16px; "
<a href="http://127.0.0.1:7777/guide/verify_accuracy/123" style="text-decoration: none; font-weight: bold; color: white; background: #01579b; border-radius: 8px; padding: 8px 16px; "
>Verify feature accuracy</a></div>
</section>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</tr>
<tr>
<td><a style="font-size: 140%;"
href="http://127.0.0.1:8888/feature/123"
href="http://127.0.0.1:7777/feature/123"
>feature one</a>
</td>
</tr>
Expand Down Expand Up @@ -88,7 +88,7 @@
<div><b>Your next steps:</b></div>

<div style="margin: 16px;">
<a href="http://127.0.0.1:8888/guide/verify_accuracy/123" style="text-decoration: none; font-weight: bold; color: white; background: #01579b; border-radius: 8px; padding: 8px 16px; "
<a href="http://127.0.0.1:7777/guide/verify_accuracy/123" style="text-decoration: none; font-weight: bold; color: white; background: #01579b; border-radius: 8px; padding: 8px 16px; "
>Verify feature accuracy</a></div>
</section>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</tr>
<tr>
<td><a style="font-size: 140%;"
href="http://127.0.0.1:8888/feature/123"
href="http://127.0.0.1:7777/feature/123"
>feature one</a>
</td>
</tr>
Expand All @@ -43,7 +43,7 @@

<h2>1. Locate your releases on the roadmap.</h2>
<p>Please check where your feature appears on the
<a href="http://127.0.0.1:8888/roadmap">roadmap page</a>.
<a href="http://127.0.0.1:7777/roadmap">roadmap page</a>.
If your feature does not appear, you may need to fill in
milestone values or update the feature's implementation status.
Be sure that you have gotten all needed approvals.</p>
Expand All @@ -70,7 +70,7 @@ <h3>feature one</h3>
</div>

<div style="margin: 16px;">
<a href="http://127.0.0.1:8888/feature/123" style="text-decoration: none; font-weight: bold; color: white; background: #01579b; border-radius: 8px; padding: 8px 16px; "
<a href="http://127.0.0.1:7777/feature/123" style="text-decoration: none; font-weight: bold; color: white; background: #01579b; border-radius: 8px; padding: 8px 16px; "
>View feature details</a></div>

<p>Guidelines for writing the summary:</p>
Expand Down
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,4 +367,4 @@ class Route:
# This is used when running locally only. When deploying to Google App
# Engine, a webserver process such as Gunicorn will serve the app. This
# can be configured by adding an `entrypoint` to app.yaml.
app.run(host='127.0.0.1', port=8080)
app.run(host='127.0.0.1', port=7777)
2 changes: 1 addition & 1 deletion packages/playwright/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ services:
command: bash -c "source cs-env/bin/activate; env && whoami && npm run start-app"
network_mode: host
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080"]
test: ["CMD", "curl", "-f", "http://localhost:7777"]
interval: 30s
timeout: 10s
retries: 10
Expand Down
4 changes: 2 additions & 2 deletions packages/playwright/playwright.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ module.exports = defineConfig({
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
use: {
/* Base URL to use in actions like `await page.goto('/')`. */
baseURL: 'http://localhost:8080',
baseURL: 'http://localhost:7777',

/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
trace: 'on-first-retry',
Expand Down Expand Up @@ -98,7 +98,7 @@ module.exports = defineConfig({
/* Run your local dev server before starting the tests */
webServer: {
command: 'npm run start',
url: 'http://localhost:8080',
url: 'http://localhost:7777',
reuseExistingServer: true,
},
});
2 changes: 1 addition & 1 deletion packages/playwright/wait-for-app.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# echo "waiting for backend to come up"
while [[ "$(curl --connect-timeout 2 -s -o /dev/null -w ''%{http_code}'' http://localhost:8080)" != "200" ]]; do
while [[ "$(curl --connect-timeout 2 -s -o /dev/null -w ''%{http_code}'' http://localhost:7777)" != "200" ]]; do
echo ..
sleep 10
done
Expand Down
2 changes: 1 addition & 1 deletion scripts/start_server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export GAE_ENV='localdev'
export DATASTORE_EMULATOR_HOST=${DATASTORE_EMULATOR_HOST:-'localhost:15606'}


gunicorn --bind :8080 --workers 4 main:app
gunicorn --bind :7777 --workers 4 main:app


# TODO(jrobbins): Consider switching back to dev_appserver when
Expand Down
4 changes: 2 additions & 2 deletions settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,11 @@ def get_flask_template_path() -> str:

if UNIT_TEST_MODE:
APP_TITLE = 'Local testing'
SITE_URL = 'http://127.0.0.1:8888/'
SITE_URL = 'http://127.0.0.1:7777/'
elif DEV_MODE:
PROD = False
APP_TITLE = 'Chrome Status Dev'
SITE_URL = 'http://127.0.0.1:8888/'
SITE_URL = 'http://127.0.0.1:7777/'
elif APP_ID == 'cr-status':
PROD = True
DEBUG = False
Expand Down

0 comments on commit 30964ae

Please sign in to comment.