From 49f52d90b64f835993502e145e2531e7640fa95a Mon Sep 17 00:00:00 2001 From: Maud Date: Thu, 4 May 2023 11:18:57 +0200 Subject: [PATCH] Update README.md (#47) Extended local setup instructions --- attribution-reporting/README.md | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/attribution-reporting/README.md b/attribution-reporting/README.md index ce89a1d..763d865 100644 --- a/attribution-reporting/README.md +++ b/attribution-reporting/README.md @@ -2,13 +2,19 @@ ## >> [Live demo](https://goo.gle/attribution-reporting-demo) -## Set and run locally +## Set up and run locally -1. Run `git clone https://github.com/GoogleChromeLabs/trust-safety-demo.git && cd trust-safety-demo/attribution-reporting` -1. Make sure you have [node.js](https://nodejs.org/en/download/) and the latest Firebase CLI `npm install -g firebase-tools` installed. -1. Install all dependencies in the functions folder `cd functions && npm install && cd ..`. -1. Run the Firebase emulator with `firebase emulators:start` to startup all the sites. If you have no Firebase project setup you can add `--project none`. - * Make sure you see the following output and port mappings. If the port mappings differ please see the [#Troubleshooting](#troubleshooting) section. +### Set up (one time only) +1. If it's not yet installed on your machine, install [node.js](https://nodejs.org/en/download/). +2. Install the latest Firebase CLI by running the following in your terminal: `npm install -g firebase-tools`. +3. In your terminal, run `git clone https://github.com/GoogleChromeLabs/trust-safety-demo.git && cd trust-safety-demo/attribution-reporting`. This command will create a folder, clone all of the `trust-safety` demo code in that folder, and navigate you to the `attribution-reporting` demo subfolder. +4. In your terminal, run `cd functions && npm install && cd ..`. This command will install all the required dependencies for you to locally run the `attribution-reporting` demo. + +### Run locally +1. Optionally, pull the latest code from this repository: in your terminal, navigate to `trust-safety-demo/attribution-reporting` and run the `git pull` command. +2. Locally start the demo: in your terminal, navigate to `trust-safety-demo/attribution-reporting` and run `firebase emulators:start`. If you have no Firebase project setup you can add `--project none` (`firebase emulators:start --project none`). + * You should now have multiple servers running: home(:8080), adtech(:8085), advertiser(:8086), publisher(:8087) server. + * Make sure you see the following output and port mappings in your terminal. If the port mappings differ, see the [#Troubleshooting](#troubleshooting) section. ```sh ... @@ -23,9 +29,8 @@ ... ``` -1. You now have multiple servers running: home(:8080), adtech(:8085), advertiser(:8086), publisher(:8087) server. -1. Open [arapi-home.localhost:8080](http://arapi-home.localhost:8080) in Chrome. -1. Follow the instructions in the UI. 🚨 In particular, make sure to follow the **Set up your browser** instructions. +4. Open [arapi-home.localhost:8080](http://arapi-home.localhost:8080) in Chrome. +5. Follow the instructions in the UI. 🚨 In particular, make sure to follow the **Set up your browser** instructions. ## Fork and customize