Skip to content

Commit

Permalink
Change hostname to dev.new.expensify.com
Browse files Browse the repository at this point in the history
  • Loading branch information
justinpersaud committed Oct 27, 2023
1 parent 2cc169d commit ed9707a
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 14 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ These instructions should get you set up ready to work on New Expensify 🙌
2. Install `watchman`: `brew install watchman`
3. Install dependencies: `npm install`
4. Install `mkcert`: `brew install mkcert` followed by `npm run setup-https`. If you are not using macOS, follow the instructions [here](https://github.com/FiloSottile/mkcert?tab=readme-ov-file#installation).
5. Create a host entry in your local hosts file, `/etc/hosts` for new.expensify.com.dev pointing to localhost:
5. Create a host entry in your local hosts file, `/etc/hosts` for dev.new.expensify.com pointing to localhost:
```
127.0.0.1 new.expensify.com.dev
127.0.0.1 dev.new.expensify.com
```

You can use any IDE or code editing tool for developing on any platform. Use your favorite!
Expand Down Expand Up @@ -133,7 +133,7 @@ Note - If you want to run app on `https://127.0.0.1:8082`, then just install the
2. Select the emulator you want to run if prompted. (If single emulator is available, then it will open automatically)
3. Let the script execute till the message `🎉 Done!`.

Note - If you want to run app on `https://new.expensify.com.dev:8082`, then just do the Android flow and use `npm run startAndroidEmulator` to start the Android Emulator every time (It will configure the emulator).
Note - If you want to run app on `https://dev.new.expensify.com:8082`, then just do the Android flow and use `npm run startAndroidEmulator` to start the Android Emulator every time (It will configure the emulator).


Possible Scenario:
Expand Down
2 changes: 1 addition & 1 deletion config/webpack/webpack.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ module.exports = (env = {}) =>
...proxySettings,
historyApiFallback: true,
port,
host: 'new.expensify.com.dev',
host: 'dev.new.expensify.com',
server: {
type: 'https',
options: {
Expand Down
4 changes: 2 additions & 2 deletions contributingGuides/APPLE_GOOGLE_SIGNIN.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,10 @@ function beginAppleSignIn(idToken) {

You can use any SSH tunneling service that allows you to configure custom subdomains so that we have a consistent address to use. We'll use ngrok in these examples, but ngrok requires a paid account for this. If you need a free option, try serveo.net.

After you've set ngrok up to be able to run on your machine (requires configuring a key with the command line tool, instructions provided by the ngrok website after you create an account), test hosting the web app on a custom subdomain. This example assumes the development web app is running at `new.expensify.com.dev:8082`:
After you've set ngrok up to be able to run on your machine (requires configuring a key with the command line tool, instructions provided by the ngrok website after you create an account), test hosting the web app on a custom subdomain. This example assumes the development web app is running at `dev.new.expensify.com:8082`:

```
ngrok http 8082 --host-header="new.expensify.com.dev:8082" --subdomain=mysubdomain
ngrok http 8082 --host-header="dev.new.expensify.com:8082" --subdomain=mysubdomain
```

The `--host-header` flag is there to avoid webpack errors with header validation. In addition, add `allowedHosts: 'all'` to the dev server config in `webpack.dev.js`:
Expand Down
4 changes: 2 additions & 2 deletions desktop/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ _.assign(console, log.functions);
// until it detects that it has been upgraded to the correct version.

const EXPECTED_UPDATE_VERSION_FLAG = '--expected-update-version';
const APP_DOMAIN = __DEV__ ? `https://new.expensify.com.dev:${port}` : 'app://-';
const APP_DOMAIN = __DEV__ ? `https://dev.new.expensify.com:${port}` : 'app://-';

let expectedUpdateVersion;
for (let i = 0; i < process.argv.length; i++) {
Expand Down Expand Up @@ -221,7 +221,7 @@ const mainWindow = () => {
let deeplinkUrl;
let browserWindow;

const loadURL = __DEV__ ? (win) => win.loadURL(`https://new.expensify.com.dev:${port}`) : serve({directory: `${__dirname}/www`});
const loadURL = __DEV__ ? (win) => win.loadURL(`https://dev.new.expensify.com:${port}`) : serve({directory: `${__dirname}/www`});

// Prod and staging set the icon in the electron-builder config, so only update it here for dev
if (__DEV__) {
Expand Down
2 changes: 1 addition & 1 deletion desktop/start.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ portfinder
env,
},
{
command: `wait-port new.expensify.com.dev:${port} && npx electronmon ./desktop/dev.js`,
command: `wait-port dev.new.expensify.com:${port} && npx electronmon ./desktop/dev.js`,
name: 'Electron',
prefixColor: 'cyan.dim',
env,
Expand Down
2 changes: 1 addition & 1 deletion docs/_includes/CONST.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% if jekyll.environment == "production" %}
{% assign MAIN_SITE_URL = "https://new.expensify.com" %}
{% else %}
{% assign MAIN_SITE_URL = "https://new.expensify.com.dev:8082" %}
{% assign MAIN_SITE_URL = "https://dev.new.expensify.com:8082" %}
{% endif %}

{% capture CONCIERGE_CHAT_URL %}{{MAIN_SITE_URL}}/concierge{% endcapture %}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"gh-actions-unused-styles": "./.github/scripts/findUnusedKeys.sh",
"workflow-test": "./workflow_tests/scripts/runWorkflowTests.sh",
"workflow-test:generate": "node workflow_tests/utils/preGenerateTest.js",
"setup-https": "mkcert -install && mkcert -cert-file config/webpack/certificate.pem -key-file config/webpack/key.pem new.expensify.com.dev localhost 127.0.0.1"
"setup-https": "mkcert -install && mkcert -cert-file config/webpack/certificate.pem -key-file config/webpack/key.pem dev.new.expensify.com localhost 127.0.0.1"
},
"dependencies": {
"@expensify/react-native-web": "0.18.15",
Expand Down
2 changes: 1 addition & 1 deletion src/CONST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ const CONST = {
ONFIDO_TERMS_OF_SERVICE_URL: 'https://onfido.com/terms-of-service/',

// Use Environment.getEnvironmentURL to get the complete URL with port number
DEV_NEW_EXPENSIFY_URL: 'https://new.expensify.com.dev:',
DEV_NEW_EXPENSIFY_URL: 'https://dev.new.expensify.com:',

SIGN_IN_FORM_WIDTH: 300,

Expand Down
2 changes: 1 addition & 1 deletion src/libs/Navigation/linkingConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import CONST from '../../CONST';
import NAVIGATORS from '../../NAVIGATORS';

export default {
prefixes: ['new-expensify://', 'https://www.expensify.cash', 'https://staging.expensify.cash', 'https://new.expensify.com.dev', CONST.NEW_EXPENSIFY_URL, CONST.STAGING_NEW_EXPENSIFY_URL],
prefixes: ['new-expensify://', 'https://www.expensify.cash', 'https://staging.expensify.cash', 'https://dev.new.expensify.com', CONST.NEW_EXPENSIFY_URL, CONST.STAGING_NEW_EXPENSIFY_URL],
config: {
initialRouteName: SCREENS.HOME,
screens: {
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/ReportUtilsTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ describe('ReportUtils', () => {
expect(ReportUtils.getReportIDFromLink('new-expensify://r/75431276')).toBe('75431276');
expect(ReportUtils.getReportIDFromLink('https://www.expensify.cash/r/75431276')).toBe('75431276');
expect(ReportUtils.getReportIDFromLink('https://staging.new.expensify.com/r/75431276')).toBe('75431276');
expect(ReportUtils.getReportIDFromLink('https://new.expensify.com.dev/r/75431276')).toBe('75431276');
expect(ReportUtils.getReportIDFromLink('https://dev.new.expensify.com/r/75431276')).toBe('75431276');
expect(ReportUtils.getReportIDFromLink('https://staging.expensify.cash/r/75431276')).toBe('75431276');
expect(ReportUtils.getReportIDFromLink('https://new.expensify.com/r/75431276')).toBe('75431276');
});
Expand Down

0 comments on commit ed9707a

Please sign in to comment.