Full Download Web Development With Node and Express Leveraging The JavaScript Stack 2nd Edition Ethan Brown PDF
Full Download Web Development With Node and Express Leveraging The JavaScript Stack 2nd Edition Ethan Brown PDF
com
https://textbookfull.com/product/web-development-
with-node-and-express-leveraging-the-javascript-
stack-2nd-edition-ethan-brown/
Pro MERN Stack: Full Stack Web App Development with Mongo,
Express, React, and Node 2nd Edition Vasan Subramanian
https://textbookfull.com/product/pro-mern-stack-full-stack-web-app-
development-with-mongo-express-react-and-node-2nd-edition-vasan-
subramanian/
textbookfull.com
Pro MERN Stack: Full Stack Web App Development with Mongo,
Express, React, and Node Vasan Subramanian
https://textbookfull.com/product/pro-mern-stack-full-stack-web-app-
development-with-mongo-express-react-and-node-vasan-subramanian/
textbookfull.com
Pro MERN Stack: Full Stack Web App Development with Mongo,
Express, React, and Node 1st Edition Vasan Subramanian
(Auth.)
https://textbookfull.com/product/pro-mern-stack-full-stack-web-app-
development-with-mongo-express-react-and-node-1st-edition-vasan-
subramanian-auth/
textbookfull.com
https://textbookfull.com/product/barriers-to-entry-overcoming-
challenges-and-achieving-breakthroughs-in-a-chinese-workplace-paul-
ross/
textbookfull.com
https://textbookfull.com/product/yoga-rising-30-empowering-stories-
from-yoga-renegades-for-every-body-first-edition-melanie-c-klein/
textbookfull.com
https://textbookfull.com/product/the-economics-of-women-men-and-work-
francine-d-blau/
textbookfull.com
A New History of Iowa Bremer
https://textbookfull.com/product/a-new-history-of-iowa-bremer/
textbookfull.com
1. Preface
2. 1. Introducing Express
a. Getting Node
b. Using the Terminal
c. Editors
d. npm
e. A Simple Web Server with Node
i. Hello World
ii. Event-Driven Programming
iii. Routing
iv. Serving Static Resources
f. Onward to Express
a. Scaffolding
b. The Meadowlark Travel Website
c. Initial Steps
e. npm Packages
f. Project Metadata
g. Node Modules
h. Conclusion
6. 5. Quality Assurance
a. The QA Plan
b. QA: Is It Worth It?
c. Logic Versus Presentation
d. The Types of Tests
e. Overview of QA Techniques
f. Installing and Configuring Jest
g. Unit Testing
i. Mocking
ii. Refactoring the Application for Testability
iii. Writing Our First Test
iv. Test Maintenance
v. Code Coverage
h. Integration Testing
i. Linting
j. Continuous Integration
k. Conclusion
i. Rendering Content
ii. Processing Forms
iii. Providing an API
k. Conclusion
e. Conclusion
9. 8. Form Handling
a. Externalizing Credentials
b. Cookies in Express
c. Examining Cookies
d. Sessions
i. Memory Stores
ii. Using Sessions
e. Using Sessions to Implement Flash Messages
f. What to Use Sessions For
g. Conclusion
a. Middleware Principles
b. Middleware Examples
c. Common Middleware
d. Third-Party Middleware
e. Conclusion
i. Sending Mail
ii. Sending Mail to Multiple Recipients
g. Better Options for Bulk Email
h. Sending HTML Email
i. Images in HTML Email
ii. Using Views to Send HTML Email
iii. Encapsulating Email Functionality
i. Conclusion
a. Execution Environments
b. Environment-Specific Configuration
c. Running Your Node Process
d. Scaling Your Website
f. Stress Testing
g. Conclusion
a. Filesystem Persistence
b. Cloud Persistence
c. Database Persistence
i. A Note on Performance
ii. Abstracting the Database Layer
iii. Setting Up MongoDB
iv. Mongoose
v. Database Connections with Mongoose
vi. Creating Schemas and Models
vii. Seeding Initial Data
viii. Retrieving Data
ix. Adding Data
x. PostgreSQL
xi. Adding Data
d. Using a Database for Session Storage
e. Conclusion
a. HTTPS
d. Conclusion
20. 19. Integrating with Third-Party APIs
a. Social Media
b. Geocoding
c. Weather Data
d. Conclusion
21. 20. Debugging
b. Conclusion
23. 22. Maintenance
25. Index
Web Development with
Node and Express
Leveraging the JavaScript Stack
SECOND EDITION
Ethan Brown
Web Development with Node and Express
by Ethan Brown
The views expressed in this work are those of the author, and do not
represent the publisher’s views. While the publisher and the author have
used good faith efforts to ensure that the information and instructions
contained in this work are accurate, the publisher and the author disclaim
all responsibility for errors or omissions, including without limitation
responsibility for damages resulting from the use of or reliance on this
work. Use of the information and instructions contained in this work is at
your own risk. If any code samples or other technology this work contains
or describes is subject to open source licenses or the intellectual property
rights of others, it is your responsibility to ensure that your use thereof
complies with such licenses and/or rights.
978-1-492-05351-4
[LSI]
Dedication
Then, of course, there are the programmers like me, who have been
around for a while. Like many programmers of my era, I started off with
assembler and BASIC and went through Pascal, C++, Perl, Java, PHP,
Ruby, C, C#, and JavaScript. At university, I was exposed to more niche
languages such as ML, LISP, and PROLOG. Many of these languages are
near and dear to my heart, but in none of these languages do I see so much
promise as I do in JavaScript. So I am also writing this book for
programmers like myself, who have a lot of experience and perhaps a
more philosophical outlook on specific technologies.
Most important, this book is for programmers who are excited. Excited
about the future of the internet and want to be part of it. Excited about
learning new things, new techniques, and new ways of looking at web
development. If, dear reader, you are not excited, I hope you will be by the
time you reach the end of this book….
Chapter 5 discusses testing and QA, and Chapter 6 covers some of Node’s
more important constructs and how they are extended and used by
Express. Chapter 7 covers templating (using Handlebars), which lays the
foundation of building useful websites with Express. Chapter 8 and
Chapter 9 cover cookies, sessions, and form handlers, rounding out the
things you need to know to build basic functional websites with Express.
Chapter 14 gets into the details of routing with Express (how URLs are
mapped to content), and Chapter 15 takes a diversion into writing APIs
with Express. Chapter 17 covers the details of serving static content, with
a focus on maximizing performance.
Chapter 16 takes what we’ve learned about Express and uses it to refactor
the running example as an SPA, with Express as the backend server
providing the API we created in Chapter 15.
Chapter 20 and Chapter 21 get you ready for the big day: your site launch.
They cover debugging, so you can root out any defects before launch, and
the process of going live. Chapter 22 talks about the next important (and
oft-neglected) phase: maintenance.
The book concludes with Chapter 23, which points you to additional
resources, should you want to further your education about Node and
Express, and where you can go to get help.
Example Website
Starting in Chapter 3, a running example will be used throughout the
book: the Meadowlark Travel website. I wrote the first edition just after
getting back from a trip to Lisbon, and I had travel on my mind, so the
example website I chose is for a fictional travel company in my home state
of Oregon (the Western Meadowlark is the state songbird of Oregon).
Meadowlark Travel allows travelers to connect to local “amateur tour
guides,” and it partners with companies offering bike and scooter rentals
and local tours, with a focus on ecotourism.
Italic
Indicates new terms, URLs, email addresses, filenames, and file
extensions.
Constant width
Used for program listings, as well as within paragraphs to refer to
program elements such as variable or function names, databases, data
types, environment variables, statements, and keywords.
Constant width bold
Shows commands or other text that should be typed literally by the
user.
Constant width italic
Shows text that should be replaced with user-supplied values or by
values determined by context.
TIP
This element signifies a tip or suggestion.
NOTE
This element signifies a general note.
WARNING
This element indicates a warning or caution.
This book is here to help you get your job done. In general, if example
code is offered with this book, you may use it in your programs and
documentation. You do not need to contact us for permission unless
you’re reproducing a significant portion of the code. For example, writing
a program that uses several chunks of code from this book does not
Random documents with unrelated
content Scribd suggests to you:
The Project Gutenberg eBook of The
robbers' cave
This ebook is for the use of anyone anywhere in the United States
and most other parts of the world at no cost and with almost no
restrictions whatsoever. You may copy it, give it away or re-use it
under the terms of the Project Gutenberg License included with this
ebook or online at www.gutenberg.org. If you are not located in the
United States, you will have to check the laws of the country where
you are located before using this eBook.
Author: A. L. O. E.
Language: English
A TALE OF ITALY
BY
A. L. O. E.
CHICAGO
CONTENTS
CHAP.
I. THE CALABRIAN INN
IV. SEPARATION
V. ROUGH COMPANY
XIII. FAILURE
XIV. TIDINGS
XV. ONWARDS
XVIII. VICTORY
Printed in United States of America
A TALE OF ITALY.
CHAPTER I.
THE CALABRIAN INN.
"I do not admire the olive, with its rugged stem and dull
dingy leaves," observed Mrs. Cleveland.
"I did not strike him—I only pushed him back. These
fellows must be taught to know their own place," Horace
haughtily replied.
CHAPTER II.
A SUSPICIOUS CHARACTER.
"I cannot believe," said the lady, "that there can lurk
much harm in one with such a countenance, and such an
exquisite voice."
The girl twisted her finger in the chain which she wore,
tightening it round her neck, but only answered with a
shrug, "Chi sa?" And quitted the room to bring in the rest of
the dinner.
"I wish that you would eat, mother; you know that you
will be quite exhausted, if you don't," cried Horace in a tone
of vexation.
CHAPTER III.
BITTER WORDS.
Horace found Jacomo the driver seated outside the door
of the inn, enjoying al fresco (in the open air) a large
plateful of maccaroni. As Horace came towards him, the
man looked a thoroughly characteristic specimen of his
nation—half supporting himself on his elbow, while his head
was thrown back to enable him with more convenience to
drop into his mouth some six inches length of the white
moist tube, to which he was helping himself with his
fingers!
"How did he get away? Did Matteo break his prison, and
set him free?"
Horace had never but once before seen his parent weep
upon his account, and the occasion which drew forth those
tears was one of the most tender recollections of his
childhood. Horace remembered the time when he had lain
in his little cot, parched by fever, and when awakening
again and again in the long, wretched nights, he had ever
seen, by the dim light of the shaded candle, the form of his
mother, ready to offer the cooling drink to relieve his
burning thirst. He remembered how, as long as his danger
continued, her calm courage had never failed her, faith and
love supporting her through sleepless nights and miserable
days; but that when the doctor had said at last, "The crisis
is over, he will do well," her over-strained feelings had at
length given way, and she had wept tears of thankful
delight over the child who lay on her bosom!