Book Image

Mastering Web Application Development with Express

By : Alexandru Vladutu
Book Image

Mastering Web Application Development with Express

By: Alexandru Vladutu

Overview of this book

Table of Contents (18 chapters)
Mastering Web Application Development with Express
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

SmartNotes application requirements


In the remaining part of this chapter, we will create a RESTful API for a sample application called SmartNotes. This application will have two types of users: guests and registered users. Guests represent unauthenticated users that can perform the following actions:

  • Create a new username so they can manage their notes

  • Get the public details of a username

  • Retrieve a list of public (shared) notes that belong to a username

  • Get a specific public note of a username

Registered users will be authorized to use the HTTP basic authentication scheme, and they will be able to perform the following activities:

  • Edit their details

  • Perform CRUD operations on notes

  • Perform all actions that guests have access to

The model for the registered users will contain the attributes username, name, and email. Both the username and the email fields are mandatory fields as well as being unique in the database. Additionally, the username needs to be alphanumeric and have a maximum length of...