March 2019
Intermediate to advanced
208 pages
5h 11m
English
Now let’s get the client side working. We’ll need to use bs-webapi to access the DOM, bs-fetch to send data to the server and get a response, and bs-json to analyze the response. Create a project named client and install those libraries:
| | cd client |
| | npm install --save bs-webapi |
| | npm install --save bs-fetch |
| | npm install --save @glennsl/bs-json |
Remember to add the dependencies to the bsconfig.json file:
| | "bs-dependencies": [ |
| | "bs-webapi", |
| | "bs-fetch", |
| | "@glennsl/bs-json" |
| | ], |
Our HTML page will be just enough to get the job done: a <select> menu to select the summary we want, and a <div> to hold the resulting table:
| | <!DOCTYPE html> |
| | <html> |
| | <head> |
| | <title>Shirt Statistics</title> ... |
Read now
Unlock full access