Skip to content

Commit e4da116

Browse files
committed
readme update
1 parent d4db83b commit e4da116

File tree

2 files changed

+108
-18
lines changed

2 files changed

+108
-18
lines changed

.vscode/settings.json

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
{
2+
"editor.fontFamily": "Operator Mono Lig",
3+
"editor.fontLigatures": true,
4+
"editor.fontWeight": "100",
5+
"editor.lineHeight": 24,
6+
"explorer.decorations.badges": true,
7+
"files.autoSave": "onWindowChange",
8+
"code-runner.runInTerminal": true,
9+
"terminal.integrated.rendererType": "dom",
10+
"[php]": {
11+
"editor.formatOnSave": true,
12+
"editor.formatOnType": true
13+
},
14+
"prettier.arrowParens": "always",
15+
"prettier.bracketSpacing": true,
16+
"prettier.htmlWhitespaceSensitivity": "css",
17+
"prettier.insertPragma": false,
18+
"prettier.jsxBracketSameLine": false,
19+
"prettier.jsxSingleQuote": false,
20+
"prettier.printWidth": 150,
21+
"prettier.proseWrap": "preserve",
22+
"prettier.quoteProps": "preserve",
23+
"prettier.requirePragma": false,
24+
"prettier.semi": true,
25+
"prettier.singleQuote": false,
26+
"prettier.tabWidth": 4,
27+
"prettier.trailingComma": "es5",
28+
"prettier.useTabs": false,
29+
"prettier.vueIndentScriptAndStyle": false,
30+
"team.showWelcomeMessage": false,
31+
"typescript.updateImportsOnFileMove.enabled": "always",
32+
"javascript.updateImportsOnFileMove.enabled": "always",
33+
"[typescript]": {
34+
"editor.formatOnType": true,
35+
"editor.defaultFormatter": "vscode.typescript-language-features"
36+
},
37+
"gitlens.statusBar.dateFormat": "",
38+
"[javascript]": {
39+
"editor.formatOnType": true,
40+
"editor.formatOnSave": true,
41+
"editor.defaultFormatter": "vscode.typescript-language-features"
42+
},
43+
"[javascriptreact]": {
44+
"editor.formatOnSave": true,
45+
"editor.formatOnType": true
46+
},
47+
"editor.formatOnSave": true,
48+
"editor.suggestSelection": "first",
49+
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
50+
"workbench.iconTheme": "material-icon-theme",
51+
"[html]": {
52+
"editor.defaultFormatter": "esbenp.prettier-vscode"
53+
},
54+
"editor.foldingStrategy": "indentation",
55+
"editor.formatOnPaste": true,
56+
"workbench.editor.highlightModifiedTabs": false,
57+
"editor.cursorBlinking": "phase",
58+
"files.trimFinalNewlines": true,
59+
"html.format.wrapLineLength": 0,
60+
"[css]": {
61+
"editor.defaultFormatter": "HookyQR.beautify"
62+
},
63+
"git.autofetch": true,
64+
"diffEditor.maxComputationTime": 0,
65+
"editor.linkedEditing": true,
66+
"html.autoClosingTags": true,
67+
"[jsonc]": {
68+
"editor.defaultFormatter": "vscode.json-language-features"
69+
},
70+
"redhat.telemetry.enabled": false,
71+
"security.workspace.trust.untrustedFiles": "open",
72+
"editor.formatOnType": true,
73+
"launch": {
74+
"configurations": [],
75+
"compounds": []
76+
},
77+
"react-native.packager.port": 19000
78+
}

README.md

Lines changed: 30 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Firebase-nodeJS-auth_middleware
1+
# Firebase NodeJS RESTful app with Auth middleware
22

33
# Building RESTful Web APIs with Cloud Functions, Firestore, Express and TypeScript
44

@@ -16,7 +16,7 @@ git clone git@github.com:zustmornah/rest-api-firebase-nodeJS-auth_middleware.git
1616

1717
## Updating firebase project id
1818

19-
You need to change the firebase project name in *.firebaserc* file.
19+
You need to change the firebase project name in _.firebaserc_ file.
2020

2121
```
2222
{
@@ -26,10 +26,9 @@ You need to change the firebase project name in *.firebaserc* file.
2626
}
2727
```
2828

29+
## Updating firebase config.json
2930

30-
## Updating firebase permissions.json
31-
32-
You need to update your firebase project permissions in *functions/src/auth/permissions.json* to match the permissions generated for your project.
31+
You need to update your project config json in _functions/src/certificates/config.json_ to match the firebase permission json generated for your project.
3332

3433
```
3534
{
@@ -46,13 +45,12 @@ You need to update your firebase project permissions in *functions/src/auth/perm
4645
}
4746
```
4847

49-
After that, you can log in to firebase in your terminal
48+
After that, you can log in to firebase in your terminal
5049

5150
```
5251
firebase login
5352
```
5453

55-
5654
## Deploy to firebase
5755

5856
To deploy functions to firebase
@@ -63,28 +61,31 @@ firebase deploy
6361

6462
## Read values from the request
6563

66-
Content Type\n
67-
Request Body\n
64+
Content Type\n
65+
Request Body\n
6866
Behavior\n
6967

7068
```
71-
application/json
72-
'{"name":"John"}'
69+
application/json
70+
'{"name":"John"}'
7371
request.body.name equals 'John'
7472
```
73+
7574
```
76-
application/octet-stream
77-
'my text'
75+
application/octet-stream
76+
'my text'
7877
request.body equals '6d792074657874' (the raw bytes of the request; see the Node.js Buffer documentation)
7978
```
79+
8080
```
81-
text/plain
82-
'my text'
81+
text/plain
82+
'my text'
8383
request.body equals 'my text'
8484
```
85+
8586
```
86-
application/x-www-form-urlencoded
87-
'name=John'
87+
application/x-www-form-urlencoded
88+
'name=John'
8889
request.body.name equals 'John'
8990
```
9091

@@ -142,6 +143,17 @@ app.put('/:id', (req, res) => {
142143
});
143144
```
144145

146+
PATCH /:id
147+
148+
```
149+
app.patch('/:id', (req, res) => {
150+
let id = req.params.id;
151+
let body = req.body;
152+
let response = Endpoints.update(id, body);
153+
res.send(response);
154+
});
155+
```
156+
145157
DELETE /:id
146158

147159
```
@@ -150,4 +162,4 @@ app.delete('/:id', (req, res) => {
150162
let response = Endpoints.delete(id);
151163
res.send(response);
152164
});
153-
```
165+
```

0 commit comments

Comments
 (0)