GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — add changes :congratulations: · gokulcoder7/fullstack-javascript@4e7d69e

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • chapter2
    • chapter2.md
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎chapter2/chapter2.md‎

Copy file name to clipboardExpand all lines: chapter2/chapter2.md
+42-155Lines changed: 42 additions & 155 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -17,47 +17,28 @@ In this chapter, we'll cover the following topics:
1717

1818
- Preparation for the use of cloud services
1919

20-
The proper setup is absolutely crucial to the productive development.
21-
You need to have everything ready when you embark on a long journey,
22-
right? The toolset will make you productive, and the other installations
23-
are dependencies like Node.js or MongoDB. They enable the server-side
24-
code and persistence, respectively. In addition to that, in the cloud
25-
section, we cover setup of the services for deployment and development.
26-
They will enable you to keep your code under version control and deploy
27-
in a scalable manner.
20+
The proper setup is absolutely crucial to your productive development. You need to have everything ready when you embark on a long journey, right? The two important things to install are dependencies and the toolset. Dependencies are absolutely necessary and technologies like Node.js or MongoDB. Moreover, the toolset is highly recommended because it will make you more productive. They enable the server-side code and persistence, respectively. In addition to that, in the cloud section, we cover setup of the services for deployment and development. They will enable you to keep your code under version control and deploy it in a scalable manner.
2821

2922
Local Setup
3023
===========
3124

32-
Local setup is what we use on our development machines when we work on
33-
the project. It includes anything from folders, browsers, editors, and
34-
HTTP servers to databases. Figure 2-1 shows an example of the initial
35-
development environment setup.
25+
Local setup is what we use on our development machines when we work on a project. It includes anything from folders, browsers, editors, and HTTP servers to databases. Figure 2-1 shows an example of the initial development environment setup.
3626

3727
Development Folder
3828
------------------
3929

40-
If you don't have a specific development folder for your web development
41-
projects, you could create a Development folder in the Documents folder
42-
(path will be Documents/Development). To work on the code example,
43-
create a fullstack-javascript folder inside your web development
44-
projects folder; for example, if you create a <span id="OLE_LINK1"
45-
class="anchor"><span id="OLE_LINK2"
46-
class="anchor"></span></span>fullstack-javascript folder inside of the
47-
Development folder, the path will be
48-
Documents/Development/fullstack-javascript. You could use the Finder on
49-
Mac OS X or the following terminal commands on OS X/Linux systems:
30+
If you don't have a specific development folder for your web development projects, you could create a `Development` folder in the `Documents` folder (path will be `Documents/Development`). To work on the code example, create a `fullstack-javascript` folder inside your web development projects folder; for example, if you create a `fullstack-javascript` folder inside of the `Development` folder, the path will be `Documents/Development/fullstack-javascript`. You could use the Finder app on macOS or the following terminal commands on Posix (macOS X/Linux) systems:
5031

5132
`$ cd ~/Documents`
5233
`$ mkdir Development`
5334
`$ cd Development`
5435
`$ mkdir fullstack-javascript`
5536

56-
![alt](media/image1.png)
37+
![](media/image1.png)
5738

5839
***Figure 2-1.** Initial development environment setup*
5940

60-
Tip To open Mac OS Finder app in the current directory from Terminal, just type and run the $ open . command. On Windows, Terminal is command prompt.
41+
**Tip** To open Mac OS Finder app in the current directory from Terminal, just type and run the $ open . command. On Windows, Terminal is command prompt.
6142

6243
To get the list of files and folders, use this UNIX/Linux command:
6344

@@ -67,186 +48,100 @@ or to display hidden files and folders, like .git, use this:
6748

6849
`$ ls -lah`
6950

70-
Another alternative to $ ls is $ ls -alt. The difference between the
71-
-lah and the -alt options is that the latter sorts items chronologically
72-
and the former sorts them alphabetically.
51+
Another alternative to `$ ls` is `$ ls -alt`. The difference between the `-lah` and the `-alt` options is that the latter sorts items chronologically and the former sorts them alphabetically.
7352

7453
You can use the Tab key to autocomplete names of the files and folders.
7554

76-
Later, you could copy examples into the fullstack-javascript folder as
77-
well as create apps in that folder.
55+
Later, you could copy examples into the `fullstack-javascript` folder as well as create apps in that folder.
7856

79-
Tip Another useful thing is to have the New Terminal at Folder option in Finder on Mac OS X. To enable it, open your System Preferences (you could use Command + Space, a.k.a. Spotlight, for it). Find Keyboard and click it. Open Keyboard Shortcuts and click Services. Select the New Terminal at Folder and New Terminal Tab at Folder check boxes. Close the window (optional).
57+
**Tip** Another useful thing is to have the New Terminal at Folder option in Finder on Mac OS X. To enable it, open your System Preferences (you could use Command + Space, a.k.a. Spotlight, for it). Find Keyboard and click it. Open Keyboard Shortcuts and click Services. Select the New Terminal at Folder and New Terminal Tab at Folder check boxes. Close the window (optional).
8058

8159
Browsers
8260
--------
8361

84-
We recommend downloading the latest version of the
85-
[WebKit](http://en.wikipedia.org/wiki/WebKit)
86-
(http://en.wikipedia.org/wiki/WebKit) or Gecko at
87-
http://en.wikipedia.org/wiki/Gecko_(layout_engine) browser of your
88-
choice:
62+
I recommend downloading the latest version of the WebKit or Gecko browser of your choice:
8963

90-
- [Chrome](http://www.google.com/chrome) (<http://www.google.com/chrome>)
91-
(recommended)
64+
- [Chrome](https://www.google.com/chrome) (<https://www.google.com/chrome>) (recommended)
65+
- [Safari](https://www.apple.com/safari) (<https://www.apple.com/safari>)
66+
- [Firefox](https://www.mozilla.org/en-US/firefox/new) (<https://www.mozilla.org/en-US/firefox/new>)
9267

93-
- [Safari](http://www.apple.com/safari) (<http://www.apple.com/safari>)
68+
Whereas Chrome (Figure 2-2) and Safari already come with built-in developer tools, you'll need the Firebug plug-in for Firefox .
9469

95-
- [Firefox](http://www.mozilla.org/en-US/firefox/new) (<http://www.mozilla.org/en-US/firefox/new>)
96-
97-
Whereas Chrome and Safari already come with built-in developer tools,
98-
you'll need the Firebug plug-in for Firefox (Figure 2-2).
99-
100-
101-
![alt](media/image2.png)
70+
![](media/image2.png)
10271

10372
***Figure 2-2.** Chrome Developer Tools in action*
10473

105-
Firebug and developer tools allow developers to do many things,
106-
including these:
74+
Firebug and developer tools allow developers to do many things, including these:
10775

10876
- Debug JavaScript
109-
11077
- Manipulate HTML and DOM elements
111-
11278
- Modify CSS on the fly
113-
11479
- Monitor HTTP requests and responses
115-
11680
- Run profiles and inspect heap dumps
117-
11881
- See loaded assets such as images, CSS, and JS files
11982

120-
![alt](media/image3.png)
121-
122-
***Figure 2-3**. Google tutorials for mastering web developer tools*
12383

12484
There are some great Chrome Developer Tools (DevTools) tutorials, such
125-
as the following and those shown in Figures 2-3 and 2-4:
126-
127-
- Explore and Master Chrome DevTools
128-
(<http://discover->devtools.codeschool.com/ ) with Code School
85+
as the following:
12986

87+
- Explore and Master Chrome DevTools (<https://discover-devtools.codeschool.com> ) with Code School
13088
- Chrome DevTools videos (<https://developers.google.com/chrome-developer-tools/docs/videos>)
89+
- Chrome DevTools overview (<https://developers.google.com/chrome-developer-tools>)
13190

132-
- Chrome DevTools overview
133-
(<https://developers.google.com/chrome-developer-tools>)
134-
135-
![alt](media/image4.png)
136-
137-
***Figure 2-4.** Mastering Chrome DevTools*
13891

13992
IDEs and Text Editors
14093
---------------------
14194

142-
One of the best things about JavaScript is that you don't need to
143-
compile the code. Because JS lives in and is run in a browser, you can
144-
do debugging right there, in a browser! It's an interpreted language,
145-
not a compiled one. Therefore, we highly recommend a lightweight text
146-
editor instead of a full-blown integrated development environment
147-
(<http://en.wikipedia.org/wiki/Integrated_development_environment>), or
148-
IDE, but if you are already familiar and comfortable with the IDE of
149-
your choice like Eclipse, (<http://www.eclipse.org>) NetBeans (<http://netbeans.org>) or Aptana (<http://aptana.com>), feel free to stick
150-
with it.
151-
152-
Here is the list of the most popular text editors and IDEs used in web
153-
development:
154-
155-
- [*MS Visual
156-
Studio*](https://www.visualstudio.com/features/node-js-vs)
157-
(<https://www.visualstudio.com/features/node-js-vs>): Node.js tools
158-
for the famous Visual Studio environment from a small
159-
Redmond, Washington-based software startup company.
160-
- [*Atom*](https://atom.io) (https://atom.io): A web editor built on web technologies from the creators of GitHub the world's largest code storage and collaboration space.
161-
- [*Sublime Text*](http://www.sublimetext.com)
162-
(<http://www.sublimetext.com>): Mac OS X and Windows versions
163-
are available. This is an even better alternative to TextMate, with
164-
an unlimited evaluation period
165-
(Figure  2-5 ).
95+
One of the best things about JavaScript is that you don't need to compile the code. Because JS lives in and is run in a browser, you can do debugging right there, in a browser! It's an interpreted language, not a compiled one. Therefore, I highly recommend a lightweight text editor instead of a full-blown integrated development environment, or IDE, but if you are already familiar and comfortable with the IDE of your choice like Eclipse (<http://www.eclipse.org>), NetBeans (<http://netbeans.org>), or Aptana (<http://aptana.com>), feel free to stick with it.
16696

167-
- [*Coda*](http://panic.com/coda) (<http://panic.com/coda>):
168-
All-in-one editor with FTP browser and preview, has support for
169-
development with and on an iPad.
170-
171-
- [*Aptana Studio*](http://aptana.com) (<http://aptana.com>):
172-
Full-sized IDE with a built-in terminal and many other tools.
173-
174-
- [*WebStorm IDE*](http://www.jetbrains.com/webstorm)
175-
(<http://www.jetbrains.com/webstorm>): Feature- rich IDE that allows
176-
for Node.js debugging. It is developed by JetBrains and marketed as
177-
the smartest JavaScript IDE (Figure  2-6 ).
178-
179-
180-
Please, please, please don't use TextEdit or Notepad++! Having code coloring and parenthesis matching will make a great difference when typing and debugging.
97+
Here is a list of the most popular text editors and IDEs used in web
98+
development:
18199

182-
![alt](media/image5.png)
100+
- [*VS Code*](https://www.visualstudio.com/features/node-js-vs) (<https://www.visualstudio.com/features/node-js-vs>): Node.js tools for the famous Visual Studio environment from a small Redmond, Washington-based software startup company.
101+
- [*Atom*](https://atom.io) (<https://atom.io>): A web editor built on web technologies from the creators of GitHub the world's largest code storage and collaboration space.
102+
- [*Sublime Text*](https://www.sublimetext.com) (<https://www.sublimetext.com>): Mac OS X and Windows versions are available. This is an even better alternative to TextMate, with an unlimited evaluation period.
103+
- [*Coda*](http://panic.com/coda) (<http://panic.com/coda>): All-in-one editor with FTP browser and preview, has support for development with and on an iPad.
104+
- [*Aptana Studio*](http://aptana.com) (<http://aptana.com>): Full-sized IDE with a built-in terminal and many other tools.
105+
- [*WebStorm*](http://www.jetbrains.com/webstorm) (<http://www.jetbrains.com/webstorm>): Feature-rich IDE that allows for Node.js debugging. It is developed by JetBrains and marketed as the smartest JavaScript IDE.
183106

184-
***Figure 2-5.** Sublime Text code editor home page*
185107

186-
![alt](media/image6.png)
108+
Please, please, please don't use Vim, TextEdit or Notepad++! Having code coloring and parentheses matching will make a great difference when typing and debugging.
187109

188-
***Figure 2-6.** WebStorm IDE home page*
189110

190111
Version Control Systems
191112
-----------------------
192113

193-
A version control system (
194-
<http://en.wikipedia.org/wiki/Revision_control>) is a must-have even in
195-
an only-one-developer situation. Also many cloud services (e.g., Heroku)
196-
require Git for deployment. We also highly recommend getting used to Git
197-
and Git terminal commands instead of using Git visual clients and apps
198-
with a GUI: GitX (<http://gitx.frim.nl>), Gitbox
199-
(<http://www.gitboxapp.com>) or GitHub for Mac (<http://mac.github.com>).
200-
201-
Subversion is a nondistributed version control system. This article
202-
compares Git vs. Subversion
203-
(<https://git.wiki.kernel.org/index.php/GitSvnComparison>).
114+
A version control system is a must-have even in projects with a single developer because such a system keep all the history which makes it easy to restore code or revert changes. Git is the most popular version control system.
204115

205-
Here are the steps to install and set up Git on your machine:
116+
Also, many cloud services (e.g., Heroku) require Git for deployment. I also highly recommend getting used to Git and Git terminal commands instead of using Git visual clients and apps with a GUI: GitX (<http://gitx.frim.nl>), Gitbox (<http://www.gitboxapp.com>), or GitHub for Desktop (<https://desktop.github.com>).
206117

207-
1. Download the latest version for your OS at
208-
<http://git-scm.com/downloads> (Figure 2-7).
118+
Subversion is a nondistributed version control system. This article compares Git vs. Subversion: <https://git.wiki.kernel.org/index.php/GitSvnComparison>).
209119

210-
![alt](media/image7.png)
211-
212-
***Figure 2-7.** Downloading latest release of Git*
213-
214-
215-
2. Install Git from the downloaded `\*.dmg` package; that is, run the
216-
`\*.pkg` file and follow the wizard.
217-
218-
3. Find the terminal app by using Command + Space, a.k.a. Spotlight
219-
(Figure 2-8), on OS X. For Windows you could use
220-
[PuTTY](http://www.chiark.greenend.org.uk/~sgtatham/putty)
221-
(<http://www.chiark.greenend.org.uk/~sgtatham/putty>)
222-
or Cygwin (<http://www.cygwin.com>).
120+
Here are the steps to install and set up Git on your machine:
223121

122+
1. Download the latest version for your OS at <https://git-scm.com/downloads>.
224123

225-
![alt](media/image8.png)
226124

125+
2. Install Git from the downloaded `\*.dmg` package; that is, run the `\*.pkg` file and follow the wizard.
227126

228-
***Figure 2-8.** Using Spotlight to find and run an application*
127+
3. Find the Terminal app by using Command + Space, a.k.a. Spotlight, on macOS. For Windows you could use [PuTTY](http://www.chiark.greenend.org.uk/~sgtatham/putty) (<http://www.chiark.greenend.org.uk/~sgtatham/putty>) or Cygwin (<http://www.cygwin.com>).
229128

230129

231-
4. In your terminal, type these commands, substituting "John Doe" and
232-
[email protected] with your name and e-mail:
130+
4. In your terminal, type these commands, substituting "John Doe" and [email protected] with your name and e-mail:
233131

234132
`$ git config --global user.name "John Doe"`
235133
`$ git config --global user.email [email protected]`
236134

237-
5. To check the installation, run command:
135+
5. To check the installation, run this command:
238136

239137
`$ git version`
240138

241-
6. You should see something like this in your terminal window (your
242-
version might vary; in our case it's 1.8.3.2, as shown in Figure
243-
2-9):
139+
6. You should see something like this in your terminal window (your version might vary; in my case it's 1.8.3.2):
244140

245141
`git version 2.14.3 (Apple Git-98)`
246142

247143

248-
Generating SSH keys and uploading them to SaaS/PaaS web sites will be
249-
covered later.
144+
Generating SSH keys and uploading them to SaaS/PaaS web sites will be covered later.
250145

251146
Local HTTP Servers
252147
==================
@@ -261,22 +156,14 @@ I recommend you use Node-based tools as static web servers. They lack
261156
GUIs, but they are simple and fast. You can install them with npm (comes
262157
with Node.js; instructions are later in this chapter):
263158

264-
- [*node-static*](https://github.com/cloudhead/node-static) (
265-
<https://github.com/cloudhead/node-static>): Static file server with
266-
built-in caching. Run `npm i -g node-static` to install.
159+
- [*node-static*](https://github.com/cloudhead/node-static) (<https://github.com/cloudhead/node-static>): Static file server with built-in caching. Run `npm i -g node-static` to install.
267160

268-
- [*http-server*](https://www.npmjs.com/package/http-server)
269-
(<https://www.npmjs.com/package/http-server>): Zero-configuration
270-
command-line HTTP server. Run `npm i -g htt-server` to install.
161+
- [*http-server*](https://www.npmjs.com/package/http-server) (<https://www.npmjs.com/package/http-server>): Zero-configuration command-line HTTP server. Run `npm i -g htt-server` to install.
271162

272-
If you prefer something with GUIs to a command-line interface (CLI), you
273-
might want to consider the following modifications of the Apache web
274-
server. MAMP, MAMP Stack, and XAMPP have intuitive GUIs that allow you
275-
to change configurations and host file settings.
163+
If you prefer something with GUIs to a command-line interface (CLI), you might want to consider the following modifications of the Apache web server. MAMP, MAMP Stack, and XAMPP have intuitive GUIs that allow you to change configurations and host file settings.
276164

277165
- [*MAMP*](<http://www.mamp.info/en/index.html>) (<http://www.mamp.info/en/index.html>): Mac, Apache, MySQL,
278166
PHP personal web server for Mac OS X.
279-
280167
- [*MAMP Stack*](http://bitnami.com/stack/mamp)
281168
(<http://bitnami.com/stack/mamp>): Mac app with PHP, Apache, MySQL,
282169
and phpMyAdmin stack build by BitNami (Apple App Store)

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.