Skip to content

Commit d05adf0

Browse files
committed
Last three challenges... hopefully.
1 parent e2bd493 commit d05adf0

File tree

3 files changed

+105
-4
lines changed

3 files changed

+105
-4
lines changed

cloud-functions-for-firebase/challenge.md

+55
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,58 @@ description: Cloud Functions Challenge
44

55
# Challenge
66

7+
## Cloud Functions
8+
9+
## Find the repo
10+
11+
We'll be working on a branch of our [firelist-react](https://github.com/how-to-firebase/firelist-react) repo named [challenge-functions](https://github.com/how-to-firebase/firelist-react/tree/challenge-functions).
12+
13+
## Localhost installation
14+
15+
Pull [the repo](https://github.com/how-to-firebase/firelist-react) directly from GitHub...
16+
17+
```text
18+
git clone https://github.com/how-to-firebase/firelist-react.git
19+
cd firelist-react
20+
git checkout challenge-functions
21+
```
22+
23+
## Edit environment files
24+
25+
Update the following files with your own project details:
26+
27+
* `/.firebaserc`
28+
* `/public/environments/environment.dev.js`
29+
* `/public/environments/environment.js`
30+
* `/functions/environments/environment.dev.js`
31+
* `/functions/environments/environment.js`
32+
33+
## Run the tests
34+
35+
Once you're on the branch, make sure to run `yarn` or `npm install` to get your Node.js dependencies.
36+
37+
Then `cd` into your `functions` directory and run `yarn` or `npm install` again.
38+
39+
Make sure that you've installed [nvm for Linux/macOS](https://github.com/creationix/nvm), [nvm for Windows](https://github.com/coreybutler/nvm-windows) or some other tool to switch between Node.js versions.
40+
41+
Use `nvm install 6.14.2` then `nvm use 6.14.2` to switch to Node version 6.14.2.
42+
43+
The Node version is important to make sure that your tests run in an identical environment to that of the Cloud Functions runtime.
44+
45+
Then run `yarn test` or `npm test` to run your tests.
46+
47+
```text
48+
yarn
49+
cd functions
50+
nvm install 6.14.2
51+
nvm use 6.14.2
52+
node --version //should read out 6.14.2
53+
yarn test
54+
```
55+
56+
## Complete the challenge
57+
58+
Search the codebase for `Challenge Functions` to find all of the challenges.
59+
60+
Work through the challenges in order from 01 to 06
61+

cloud-messaging/challenge.md

-4
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@
66

77
We'll be working on a branch of our [firelist-react](https://github.com/how-to-firebase/firelist-react) repo named [firebase-messaging](https://github.com/how-to-firebase/firelist-react/tree/master).
88

9-
## Codesandbox
10-
11-
Simply open up the [CodeSandbox.io](https://codesandbox.io/s/github/how-to-firebase/firelist-react/tree/firebase-messaging) project :\)
12-
139
## Localhost installation
1410

1511
Pull [the repo](https://github.com/how-to-firebase/firelist-react) directly from GitHub...

firebase-storage/challenge.md

+50
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,55 @@ description: Firebase Storage Challenge
44

55
# Challenge
66

7+
## Firebase Storage
78

9+
## Find the repo
10+
11+
We'll be working on a branch of our [firelist-react](https://github.com/how-to-firebase/firelist-react) repo named [challenge-storage](https://github.com/how-to-firebase/firelist-react/tree/challenge-storage).
12+
13+
## Localhost installation
14+
15+
Pull [the repo](https://github.com/how-to-firebase/firelist-react) directly from GitHub...
16+
17+
```text
18+
git clone https://github.com/how-to-firebase/firelist-react.git
19+
cd firelist-react
20+
git checkout challenge-storage
21+
```
22+
23+
## Edit environment files
24+
25+
Update the following files with your own project details:
26+
27+
* `/.firebaserc`
28+
* `/public/environments/environment.dev.js`
29+
* `/public/environments/environment.js`
30+
* `/functions/environments/environment.dev.js`
31+
* `/functions/environments/environment.js`
32+
33+
## Deploy Cloud Functions
34+
35+
If you had some trouble deploying Cloud Functions earlier, make sure to deploy the correct functions now.
36+
37+
Run `yarn deploy:functions` to deploy valid versions of each function up to your Firebase project.
38+
39+
## Start the app
40+
41+
Once you're on the branch, make sure to run `yarn` or `npm install` to get your Node.js dependencies.
42+
43+
Then run `yarn start` or `npm run start` to spin up the development server.
44+
45+
```text
46+
yarn
47+
yarn start
48+
```
49+
50+
## Complete the challenge
51+
52+
Search the codebase for `Challenge Storage` to find all of the challenges.
53+
54+
Read the comments and complete the steps in those files.
55+
56+
- `src/storage/delete-image.js`
57+
- `src/storage/get-upload-observable.js`
858

0 commit comments

Comments
 (0)