March 2019
Intermediate to advanced
208 pages
5h 11m
English
We now have all the parts we need for our project. Let’s set up the server. But first, a disclaimer: this section isn’t intended as a complete guide to using Express. It provides just enough explanation to get our project working.
Create a project named server, install the Express server, and add the dependencies to the bsconfig.json file:
| | cd server |
| | npm install --save express # the server |
| | npm install --save bs-express # ReasonML bindings |
| | npm install --save @glennsl/bs-json |
| | npm install --save papaparse # to parse the CSV file |
| | "bs-dependencies": [ |
| | "bs-express", |
| | "@glennsl/bs-json" |
| | ], |
The server code starts by instantiating a server and then telling it to listen on port 3000:
Read now
Unlock full access