switches road closure app to a locally served model. instead of relying on an external storage service to save/load road closure data, this adds a small webserver (server.ts — started by running yarn server) that allows reading and writing files to and from the user's local filesystem.
New usage flow
clone or download the repository
create a copy of .env.example called .env and edit the values to add:
directory — the full path where the road closure data will be saved to
extent — the geographic boundary within which road closures will be generated, in the format [minX, minY, maxX, maxY]
port — the port that the server will run on (3001 by default)
server_port — same as port
base_server_url— http://localhost by default if you run start:local or build:local
running yarn build:local
this sets an environment variable indicating that this is a build of the app that relies on a local server
running yarn server and navigating to :
this can be extended to support custom hosting environments and file storage destinations in the future
do not merge until https://github.com/sharedstreets/sharedstreets-js/pull/61 is released
switches road closure app to a locally served model. instead of relying on an external storage service to save/load road closure data, this adds a small webserver (
server.ts
— started by runningyarn server
) that allows reading and writing files to and from the user's local filesystem.New usage flow
clone or download the repository
create a copy of
.env.example
called.env
and edit the values to add:directory
— the full path where the road closure data will be saved toextent
— the geographic boundary within which road closures will be generated, in the format [minX, minY, maxX, maxY]port
— the port that the server will run on (3001 by default)server_port
— same asport
base_server_url
—http://localhost
by default if you runstart:local
orbuild:local
running
yarn build:local
running:
yarn server
and navigating tothis can be extended to support custom hosting environments and file storage destinations in the future