Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Getting Started with RethinkDB

You're reading from  Getting Started with RethinkDB

Product type Book
Published in Mar 2016
Publisher Packt
ISBN-13 9781785887604
Pages 176 pages
Edition 1st Edition
Languages
Author (1):
Gianluca Tiepolo Gianluca Tiepolo
Profile icon Gianluca Tiepolo

Table of Contents (15) Chapters

Getting Started with RethinkDB
Credits
About the Author
Acknowledgement
About the Reviewer
www.PacktPub.com
Preface
1. Introducing RethinkDB 2. The ReQL Query Language 3. Clustering, Sharding, and Replication 4. Performance Tuning and Advanced Queries 5. Programming RethinkDB in Node.js 6. RethinkDB Administration and Deployment 7. Developing Real-Time Web Applications Index

Programming the frontend


When the user visits our web application's homepage, the index.ejs template is rendered to screen. This template is actually just a simple HTML document that links to a client-side JavaScript file called notes.js.

If we take a look at the EJS template, we can see exactly where the JavaScript file is loaded:

<script src="notes.js"></script>

You maybe wondering where this file comes from. Actually, this JavaScript file is the one we saved into the public folder of our web application. This script is executed from the user's browser as soon as the HTML page has finished loading.

This script is responsible of doing a few things:

  • Adding drag and drop capabilities to the notes

  • Initializing Socket.io

  • Listening for updates

  • Updating the graphics to reflect changes

    Note

    As the focus of this book is interacting with RethinkDB, we won't go over the code that adds drag-and-drop capabilities to the notes or the code that works with the graphics. Instead, we'll focus on how to...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}