-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAdditionalInfo.txt
73 lines (60 loc) · 2.58 KB
/
AdditionalInfo.txt
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
*** How To Use GitHub with Visual Studio Code | GitHub VSCode showtime ***
https://www.youtube.com/watch?v=aUhl3B6ZweQ&ab_channel=CoderDave
1) Source Control Management
source control > clone repo > clone from GitHub > login > choose repo > choose local folder
--> after doing changes
source control > stage changes (+) > write message > commit code locally (checkmark)
--> if changes are ready for github too
> ... > Push > code uploaded to github
*** Node.js ***
- DOWNLOAD from nodejs.org the LTS (long term support) version
- follow INSTALLation steps
- https://stackoverflow.com/questions/19202007/making-sure-usr-local-bin-is-in-my-path-on-mac
echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/arisgiotis/apache-maven-3.8.4/bin
- a way to run JavaScript outside of the browser
- desktop apps, servers, anything that you want to do with JS
*** GOAL ***
- create a web server using node.js
*** STEPS ***
- create a server
- require a module/library called http
used to start the server
- tell it to start listening to a port
*** RUN SERVER ***
- terminal is open inside this project
- @ terminal > node app.js
*** KILL SERVER ***
- @ terminal > ctrl + C
*** TERMINAL ***
- if terminal is not shown in VS Code
- > View > Terminal
*** SERVER RESPONDING [PLAIN TEXT] ***
- implement function
- return a response object
'Hello Node'
- first RUN the SERVER
- then OPEN BROWSER & GO to localhost:3000 where server is listening
see 'Hello Node'
- killing the server & refreshing the page gives you 'The site cannot be reached'
*** RENDER HTML ***
- render html from our web server rather than plain text
- create a HTML file, index.html, that we want to render
- generate outline of html document [boilerplate code]
@ index.html > ! + enter
*** SEND HTML ***
- tell browser that we are going to write html
- 200 is a good status code
- tell browser to parse it as html
- import library/module fs for file handling that we need
- 404 status --> means NOT FOUND
- data: all the information inside index.html
*** RESTART SERVER ***
- everytime you make a change > restart the server
*** GITHUB.DEV UTILIZATION ***
- from GitHub > use github.dev to make changes online to a repo
- like an online version of local VS Code Editor
*** CHOOSE BRANCH ***
- when using github.dev to the bottom left of VS Code you can choose the BRANCH
- when working alone you should use only a main BRANCH
- no need to create a development BRANCH