NodeJS Tutorials

1.1 - Introduction to Node - Writing Your Own Routes

  • Posted on: 25 July 2018
  • By: Ryoma Ohira

Creating Your Node Project

Create a new folder, call it workshop-01, and run npm init in your terminal to initialise the a new node project. In the terminal, npm will ask you a few questions so that it can accurately identify what your project is. This is useful for when you want to publish your own packages for the public. For the moment, you can press [Enter] to submit the default values for each question. This should create a new package.json file inside your workshop-01 folder. 

4.1 REST back-end in Node

  • Posted on: 9 August 2018
  • By: Ryoma Ohira

1. Introduction to REST

REST is short for REpresentational State Transfer and is a style of system architecture for communicating between systems on the internet. Compliant systems are called RESTful systems and separate the concerns between client and server systems. It's known as being a 'stateless' architecture in that the client and server are unconcerned with the states of the other. An example is when you make a search query, your browser sends a message to the server requesting results with a key word and search parameters. When the server receives a message, it will run some processes and then return a web page with the results of the query. It then doesn't really care what your browser does until it makes the next request (maybe the next page of results). 

In this tutorial, we'll be creating a Node server that uses Express in order to serve an Angular application. 

4.2 Angular to Node APIs

  • Posted on: 9 August 2018
  • By: Ryoma Ohira

With the Node server and the REST-API set up in the previous lab, we connect our Angular app to request on this API. Once the Node server returns our list of students, our Angular app will display them in a list. 

Pages