Reader small image

You're reading from  Getting Started with RethinkDB

Product typeBook
Published inMar 2016
Reading LevelIntermediate
PublisherPackt
ISBN-139781785887604
Edition1st Edition
Languages
Right arrow
Author (1)
Gianluca Tiepolo
Gianluca Tiepolo
author image
Gianluca Tiepolo

Gianluca Tiepolo is a cybersecurity researcher who specializes in mobile forensics and incident response. He holds a BSc degree in Computer Science and an MSc in Information Security, as well as several security-related certifications. Over the past 12 years, he has performed security monitoring, threat hunting, incident response, and intelligence analysis as a consultant for dozens of organizations, including several Fortune 100 companies. Gianluca is also the co-founder of the startup Sixth Sense Solutions, which developed AI-based anti-fraud solutions. Today, Gianluca works as a Security Delivery Team Lead for consulting firm Accenture Security. In 2016, he authored the book Getting Started with RethinkDB, published by Packt Publishing.
Read more about Gianluca Tiepolo

Right arrow

Configuring the router


When you design the routes for a web application, you should think about all the features that the application should provide to the user and map these features to an HTTP request.

In our example app, the user will need to load the homepage, get a list of all existing notes, create a new note, update a note's position, and delete a note. What we should do now is create an API for our app, which creates a route for all of these actions. I've personally organized it with the following routes:

  • get (/: This route gets called when the user visits the app's homepage from his browser and is responsible for rendering the view to the screen

  • get (/notes: This route allows us to request a list of all existing notes that are stored in the database

  • post (/notes: This route is called when the user creates a new note

  • post (/note/:id: When the user moves a note, a request to this route is performed, passing the note's ID

  • delete (/note/id: Finally, this route allows us to delete a specific...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Getting Started with RethinkDB
Published in: Mar 2016Publisher: PacktISBN-13: 9781785887604

Author (1)

author image
Gianluca Tiepolo

Gianluca Tiepolo is a cybersecurity researcher who specializes in mobile forensics and incident response. He holds a BSc degree in Computer Science and an MSc in Information Security, as well as several security-related certifications. Over the past 12 years, he has performed security monitoring, threat hunting, incident response, and intelligence analysis as a consultant for dozens of organizations, including several Fortune 100 companies. Gianluca is also the co-founder of the startup Sixth Sense Solutions, which developed AI-based anti-fraud solutions. Today, Gianluca works as a Security Delivery Team Lead for consulting firm Accenture Security. In 2016, he authored the book Getting Started with RethinkDB, published by Packt Publishing.
Read more about Gianluca Tiepolo