O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

A RESTful API Node Exercise for Beginners JavaScript and JQuery

Video Description

Build a JSON data checklist using JavaScript from scratch

About This Video

  • How to create projects with Node.
  • We’ll build out a simple web application.
  • Learn everything you need to setup a localhost, resources to work with node, setup a SQLite database, setup routes for CRUD and a whole lot more

In Detail

When building RESTful services, it is really important to choose the right framework. Node.js, with its asynchronous, event-driven architecture, is exactly the right choice for building RESTful APIs.

We’ll explore how the terminal can be used to set up a backend server using Node.js. Using the command line interface, we’ll navigate and setup folders. After a brief introduction with examples of using NodeJS, we’ll explore Node modules and how they work into your main app file. Then, we’ll learn how to set up an HTTP server using node ready for localhost. Going forward we’ll explore getting file content and reading it as data. Then, we’ll power up your node application with Express and Nodemon. We’ll use Body Parser to get post data and find out how Middleware app use works. Then, apply logic with a conditional statement to create a login check and set up our application for static frontend files index.html. Getting back to the frontend with JavaScript and HTML. We’ll bring both together for requests and responses to the server and webpage. Further, we’ll set up our routes for a RESTful API, GET, POST, PUT and DELETE. We’ll use these data to output to our page. In conclusion, we’ll refactor the codes with a helper file and Update with adding an SQLite Database to hold data.