Skip to content

Commit

Permalink
Update Getting Started DocC Documentation for the Firebase Emulator (#…
Browse files Browse the repository at this point in the history
…313)

* Update README.md
* Update getting-started.tutorial

Co-authored-by: Mikaela Caron <mikaelacaron@gmail.com>
  • Loading branch information
Vai-Man and mikaelacaron authored Oct 2, 2024
1 parent bf28c15 commit 2a5dc70
Showing 1 changed file with 65 additions and 2 deletions.
67 changes: 65 additions & 2 deletions Basic-Car-Maintenance/Documentation.docc/getting-started.tutorial
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,53 @@
}
}
}

@Section(title: "Starting on an issue") {

@Section(title: "Setting Up Firebase Local Emulator") {
@ContentAndMedia {
Follow these steps to set up the Firebase Local Emulator to load data locally and not affect production. Please do not skip this step.
}

@Steps {
@Step {
Install Homebrew, a package manager for macOS, if you haven't already:

`/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"`
}
@Step {
Install Xcode command line tools:

`xcode-select --install`
}
@Step {
Install Node Version Manager (NVM). You then don't need to update the system node version.

`brew install nvm`
}
@Step {
Add the executable to the `$PATH` via `.zshrc` or `.bashrc` file as prompted after installation. Do NOT forget this! (and then restart your Terminal)
}
@Step {
Download and use the latest stable version of Node.js:

`nvm install stable`
}
@Step {
`nvm use stable`
}
@Step {
Install OpenJDK, and add the executable to the `$PATH` via `.zshrc` or `.bashrc` file as prompted after installation. Do NOT forget this! (and then restart your Terminal)

`brew install openjdk`
}
@Step {
Install Firebase Tools for running the emulator.

`npm install -g firebase-tools`
}
}
}

@Section(title: "Start Working on an Issue") {
@ContentAndMedia {
**BEFORE** starting on an issue, comment on the issue you want to work on.

Expand All @@ -106,6 +151,24 @@

@Image(source: 8-checkout.png, alt: "Checkout issue locally")
}
@Step {
Anytime you run the project, first in Terminal `cd` to `backend` in the Basic-Car-Maintenance directory. This is the directory with the `firebase.json` file, you should see that if you type `ls`

`cd backend`
}
@Step {
Start the Firebase Emulator. Which will start the emulators, and keep your data in local-data directory. Meaning when you start and stop the emulator your data will persist.

`firebase emulators:start --import=./local-data --export-on-exit`
}
@Step {
Run the app. You should see your anonymous user in Authentication, and once you add new data, see it in Firestore emulator UI at: http://127.0.0.1:4000/firestore

If you don't see your user, delete the app from the simulator, and in the menu go to Device > Erase All Content and Settings (which resets your simulator), and try to run again
}
@Step {
When your feature or fix is complete, open a pull request (PR) from your feature branch to the `dev` branch. Make sure to use a descriptive PR title and fill out the entire PR template without deleting any sections.
}
}
}
}

0 comments on commit 2a5dc70

Please sign in to comment.