Skip to Content
Your First Week With Node.js, 2nd Edition
book

Your First Week With Node.js, 2nd Edition

by James Hibbard, Craig Buckler, Mark Brown, Nilson Jacques, James Kolce, Paul Orac, M. David Green, Florian Rappl
April 2020
Beginner content levelBeginner
192 pages
3h 15m
English
SitePoint
Content preview from Your First Week With Node.js, 2nd Edition

Chapter 4: Forms, File Uploads and Security with Node.js and Express

by Mark Brown and James Hibbard

If you’re building a web application, you’re likely to encounter the need to build HTML forms on day one. They’re a big part of the web experience, and they can be complicated.

Typically the form-handling process involves:

  • displaying an empty HTML form in response to an initial GET request
  • user submitting the form with data in a POST request
  • validation on both the client and the server
  • re-displaying the form populated with escaped data and error messages if invalid
  • doing something with the sanitized data on the server if it’s all valid
  • redirecting the user or showing a success message after data is processed

Handling form data also comes with ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Learning Node.js Development

Learning Node.js Development

Andrew Mead
Node.js: Tools & Skills, 2nd Edition

Node.js: Tools & Skills, 2nd Edition

James Hibbard, Michael Wanyoike, Nilson Jacques, Jay Raj, Manjunath M

Publisher Resources

ISBN: 9781098122805Errata Page