-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathextra
More file actions
380 lines (292 loc) · 7.31 KB
/
extra
File metadata and controls
380 lines (292 loc) · 7.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
https://code.visualstudio.com/download
https://github.com/
https://github.com/Aakashdeveloper
https://github.com/Aakashdeveloper/edu_intern_web
git bash> https://git-scm.com/downloads
>> only one time
git clone https://github.com/Aakashdeveloper/edu_intern_web
go inside edu_intern_web
git pull
HTML > structure
CSS > design
Bootstrap 3,4,5 > Responsive
JavaScript > Dynamic
NodeJS
Express
mongodb
postgress
redis
React
>>>extension
auto close tag
vscode-icons
tabnine
gitlens
githistory
//////HTML//////
Block Level
Inline
///////Css///////
Inline
StyleTag
StyleSheet
Inline > StyleTag > StyleSheet
<h1>Hii</h1>
{
color:red;
font-size:20px;
text-align:center;
margin:1%
}
inline{
color:red;
font-size:20px;
}
StyleTag{
color:orange;
text-align:center;
font-size:40px;
}
StyleSheet{
color:olive;
text-align:right;
font-size:40px;
margin:1%
}
h1 > It will target all the h1 tag of page unless if they don't have any other property
id > To target any unique element
class > to target group of element
solid
dotted
dashed
double
groove
bootstrap3
grid Basic
col-xs < 768px
sm > 768px
md > 992px
lg > 1200px
https://getbootstrap.com/docs/3.3/components/
bootstrap4
col- <576px
col-sm >576px
col-md > 768px
col-lg >992px
col-xl >1200px
bootstrap5
xs < 576px
sm > 576px
md > 768px
lg > 992px
xl > 1200px
xxl> 1400
12/4
3
// first time
git init
git add .
git commit -m "first commit"
git remote add origin https://github.com/Aakashdeveloper/stockmarket.git
git push -u origin master
// next all time
git add .
git commit -m "first commit"
git push
/////////
dummy url
/////////
*Install NodeJs (https://nodejs.org/en/)
^One Time^
##Windows##
> open cmd as administrator
> npm i -g json-server
> close cmd
##Mac/Linux##
> open terminal
> sudo npm i -g json-server
>>>>>>>><<<<<<<<<
json-server --watch employee.json --port 8500
//////target/////
id (unique)
Class (common)
Tag (h1,p,a)
storage
Filter
darkmode
geolocation
////////
stocksapp
https://api.openweathermap.org/data/2.5/forecast/daily?lat=30.7333148&lon=76.7794179&mode=json&units=metric&cnt=5&appid=fbf712a5a83d7305c3cda4ca8fe7ef29
http://api.openweathermap.org/data/2.5/forecast/daily?q=Delhi&mode=json&units=metric&cnt=5&appid=fbf712a5a83d7305c3cda4ca8fe7ef29
NodeJs>>
Node is single threaded, Async, Nonblocking I/O
convert code in byte
code
||
\/
machine
||
\/
byte
code
||
\/
byte
npm
> node package manager
//////////
package.json
//////
> Entry point to application
> metadata > Description,version,name,author
> script (start,test,build)
> packages
>>>>><<<<<<
Step to generate package.json
>>>>><<<<<<
*NodeJs must be installed in our system
> open cmd/terminal
> navigate to the folder
> npm init
> answer all question
> type "yes"
>>>>><<<<<<
Step to install packages
>>>>><<<<<<
> open cmd/terminal
> navigate to the folder
> npm i packagename
> local dependencies
# local to the folder
# used in same folder
# do not need admin access
> global dependencies
# install in your system(laptop)
# used for any application
# only those package that help to
start, build ,test application
# Need admin access
///// step to install global packages /////
>>>Window<<<
> open cmd as administrator
> npm i -g package name
> close cmd
>>>Mac/Linux<<<
> open terminal
> sudo npm i -g package name
> close terminal
> npm i -g nodemon
C > Create (insert) (post)
R > Read (select) (get)
U > Update (update) (put)
D > Delete (remove) (delete)
npm i mongodb morgan chalk cors body-parser
/////
params /
> params are complusory to define the
queryparams ?
> no need to define
/******GetAllUser*****/
(GET)> https://developerjwt.herokuapp.com/api/auth/users
/******Register*****/
(POST)> https://developerjwt.herokuapp.com/api/auth/register
(body) => {"name":"Aakash", "email":"aa@gmail.com","password":"12345678","phone":343432,role?":"user"}
/******Login*****/
(POST) => https://developerjwt.herokuapp.com/api/auth/login
(body) => {"email":"aa@gmail.com","password":"12345678"}
(response)=> {auth:true,token:'dgsdg'}
/******UserInfo*****/
(GET) => https://developerjwt.herokuapp.com/api/auth/userinfo
(Header) => {'x-access-token':'token value from login'}
npm i packagename --save
https://chrome.google.com/webstore/detail/json-viewer/gbmdgpbipfallnflgajpaliibnhdgobh
React
> react is a frontend framework that help to
build single page application using components
npm i create-react-app
create-react-app appname
/// step to generate react app///
> go inside the folder
> npx create-react-app appname
//////
react >>>>> This is the main package
react-dom >>>>> This package help to bind Js with html
react-script >>>> This help to run the application
functional component
>>> dumb component
>>> only use for displaying
>>> we cannot maintain the state and cannot all api
class component
>>> logical components
>>> we can call api, maintain state as well as displaying
>>> heavy as compare to functional components
HookComponent
//////////
State
> state act like a local variables
> every component have its own state
> scope of state will be in same component
> we can update the value of state(mutable)
> Any data interaction should happen through state only
props
> Help to transfer data between components
> We can transfer data only between the nested component
> We cannot update the value of props(immutable)
parent > child (props)
child > parent (props with function)
// parent
function add(a,b){
return a+b
}
// child
add(1,2)
npm i react-router-dom@5.3.0
params /
queryparams ?
////Default Props///
History > For redireaction
Location > for queryparams
Match > for params
https://dashboard.paytm.com/next/apikeys
var a = "status=TXN_SUCCESS&ORDERID=TEST_49069&date=2021-12-26%2011:45:02.0&bank=Axis%20Bank"
undefined
a.split('&')
(4) ['status=TXN_SUCCESS', 'ORDERID=TEST_49069', 'date=2021-12-26%2011:45:02.0', 'bank=Axis%20Bank']
a.split('&')[0]
'status=TXN_SUCCESS'
a.split('&')[0].split('=')
(2) ['status', 'TXN_SUCCESS']
a.split('&')[0].split('=')[1]
'TXN_SUCCESS'
a.split('&')[1].split('=')[1]
'TEST_49069'
a.split('&')[2].split('=')[1]
'2021-12-26%2011:45:02.0'
a.split('&')[3].split('=')[1]
'Axis%20Bank'
a.split('&')[1].split('=')[1].split('_')
(2) ['TEST', '49069']
a.split('&')[1].split('=')[1].split('_')[1]
'49069'
If Correct Info Token valid
Register => Login ------------------> Generate Token ------------> Get User Profile
| |
| if wrong info | Invalid Token
| |
\/ \/
Dont let you login Dont let you login
npm i jsonwebtoken bcryptjs body-parser cors express mongoose
/////////////
/******GetAllUser*****/
(GET)> https://developerjwt.herokuapp.com/api/auth/users
/******Register*****/
(POST)> https://developerjwt.herokuapp.com/api/auth/register
(body) => {"name":"Aakash", "email":"aa@gmail.com","password":"12345678","phone":343432,role?":"user"}
/******Login*****/
(POST) => https://developerjwt.herokuapp.com/api/auth/login
(body) => {"email":"aa@gmail.com","password":"12345678"}
(response)=> {auth:true,token:'dgsdg'}
/******UserInfo*****/
(GET) => https://developerjwt.herokuapp.com/api/auth/userinfo
(Header) => {'x-access-token':'token value from login'}