April 2020
Intermediate to advanced
716 pages
18h 55m
English
We will ensure that any fetch method we defined for the client code can also be used on the server by using the isomorphic-fetch Node module. We will first install the module by running the following command from the command line:
yarn add isomorphic-fetch
Then, we will simply import isomorphic-fetch in express.js, as shown in the following code, to ensure fetch methods now work isomorphically both on the client and the server side:
mern-mediastream/server/express.js
import 'isomorphic-fetch'
This isomorphic-fetch integration will make sure that the read fetch method, or any other fetch method that we defined for the client, can now be used on the server as well. Before this integration becomes functional, we need to ensure ...
Read now
Unlock full access