https://s3-us-west-2.amazonaws.com/secure.notion-static.com/5557e48a-09d4-482e-a09b-1fe764387746/frontend_app_sample.gif

Enable CORS

$ npm install cors

server.js

...
// allow CORS
const cors = require('cors')
server.use(cors())
...

CORS must be enabled for our server to be available in domains other than localhost:4000.

We'll discuss CORS in details Chapter 6

Start server

$ npm start

Run the sample frontend app:

To see code:

To run frontend code

$ cd sample_ui
$ npm run ui