HomePhabricator
Diffusion Comm 2463ccbd0329

[server][docs] new migration to fix baseRoutePath on localhost

Description

[server][docs] new migration to fix baseRoutePath on localhost

Summary: migration 0 in migrations.js broke server locally. per the dev environment docs, apache proxies /comm/ to http://localhost:3000/. however, by setting baseRoutePath to basePath, the server was only serving requests for the app at http://localhost:3000/comm/. this diff introduces a new migration to fix commapp_url.json and squadcal_url.json by setting baseRoutePath to /. i've also updated the dev environment docs with the correct baseRoutePath.

Test Plan:
ran the migration a few times and checked that:

  1. if the baseDomain is not "http://localhost", the file is ignored
  2. if the baseRoutePath is missing, it's added and set to "/" (this is redundant since migration 0 makes sure baseRoutePath exists, but just to be safe...)
  3. if the baseRoutePath is present, it's changed to "/"

after testing the migration, i also confirmed that i could access the web app locally

Reviewers: atul, ashoat, benschac

Reviewed By: ashoat

Subscribers: palys-swm, Adrian, karol-bisztyga, yayabosh

Differential Revision: https://phabricator.ashoat.com/D3577

Details

Provenance
varunAuthored on Mar 30 2022, 2:09 PM
Reviewer
ashoat
Differential Revision
D3577: [server][docs] new migration to fix baseRoutePath on localhost
Parents
rCOMMdcd0a2c4afbb: [server] Reorder Express routers
Branches
Unknown
Tags
Unknown