July 2018
Intermediate to advanced
354 pages
8h 51m
English
The JSON server allows you to host a local REST API by supporting basic CRUD operations without writing any code. The node module works by reading a source file with a complete JSON object. The PWA ticket app relies on a JSON data structure, which is outlined here:
{
tickets: [],
users: [],
futureEvents: [],
pastEvents: [],
contact: []
}
You can configure the data source to include methods to return data based on supplied parameters. I chose not to do this in order to keep things simple. Hence, this explains the use of both the futureEvents and pastEvents arrays instead of creating these lists on demand.
To execute json-server, run the command-line utility with the --watch switch. The watch switch causes json-server ...
Read now
Unlock full access