diff --git a/docs/dev_environment.md b/docs/dev_environment.md --- a/docs/dev_environment.md +++ b/docs/dev_environment.md @@ -593,6 +593,8 @@ ## Running keyserver +To run the web app, landing page, or the mobile app on the iOS Simulator or Android Emulator, you’ll need to run the keyserver. + Open a new terminal and run: ``` @@ -608,29 +610,54 @@ ## Running web app -Open a new terminal and run: +First, make sure that the keyserver is running. If you haven’t already, run: + +``` +cd keyserver +yarn dev +``` + +Next, open a new terminal and run: ``` cd web yarn dev ``` -This will start two processes. One is `webpack-dev-server`, which will serve the JS files. `webpack-dev-server` also makes sure the website automatically hot-reloads whenever any of the source files change. The other process is `webpack --watch`, which will build the `app.build.cjs` file, as well as rebuilding it whenever any of the source files change. The `app.build.cjs` file is consumed by the Node server in order to pre-render the initial HTML from the web source (“Server-Side Rendering”). +You should now be able to load the web app in your web browser at http://localhost/comm/. + +This command will start two processes. One is `webpack-dev-server`, which will serve the JS files. `webpack-dev-server` also makes sure the website automatically hot-reloads whenever any of the source files change. The other process is `webpack --watch`, which will build the `app.build.cjs` file, as well as rebuilding it whenever any of the source files change. The `app.build.cjs` file is consumed by the Node server in order to pre-render the initial HTML from the web source (“Server-Side Rendering”). ## Running landing page -Open a new terminal and run: +First, make sure that the keyserver is running. If you haven’t already, run: + +``` +cd keyserver +yarn dev +``` + +Next, open a new terminal and run: ``` cd landing yarn dev ``` +You should now be able to load the landing page in your web browser at http://localhost/commlanding/. + This runs the same two processes as the web app, but for the landing page. Note that the `landing.build.cjs` file (similar to the web app’s `app.build.cjs` file) is consumed by the Node server. ## Running mobile app on iOS Simulator -First, make sure that the Metro bundler is running. If you haven’t already, open a new terminal and run: +First, make sure that the keyserver is running. If you haven’t already, run: + +``` +cd keyserver +yarn dev +``` + +Next, make sure that the Metro bundler is running. If you haven’t already, open a new terminal and run: ``` cd native @@ -639,11 +666,18 @@ This command runs two processes. The first is the Metro bundler, which handles bundling our app’s JavaScript code and communicating with the debug build of the app running on either a physical or virtual device. The second is the `remotedev-server` for Redux, which is a proxy of sorts through which the Redux monitor (running in the Chrome extension) can communicate with the debug build of the app. -Next, open `native/ios/Comm.xcworkspace` in Xcode. Select a Simulator from the Scheme menu in the Workspace Toolbar. Then hit the Run button to build and run the project. +Finally, open `native/ios/Comm.xcworkspace` in Xcode. Select a Simulator from the Scheme menu in the Workspace Toolbar. Then hit the Run button to build and run the project. ## Running mobile app on Android Emulator -First, make sure that the Metro bundler is running. If you haven’t already, open a new terminal and run: +First, make sure that the keyserver is running. If you haven’t already, run: + +``` +cd keyserver +yarn dev +``` + +Next, make sure that the Metro bundler is running. If you haven’t already, open a new terminal and run: ``` cd native @@ -652,7 +686,7 @@ This command runs two processes (see previous section for details). -Next, boot up an Android Emulator using Android Studio’s AVD Manager. You should have a single Android Emulator (or plugged-in device) running at one time. +Next, boot up an Android Emulator using Android Studio’s Virtual Device Manager. You should have a single Android Emulator (or plugged-in device) running at one time. Finally, use this command to build and run the Android app: