Express server

On the nodejs side, we will use express package to create our HTTP server. We will also need the reify package so that we can require files that uses the import/export syntax inside nodejs (which doesn't support it natively).

  1. Install the new packages:
      npm i -S express reify
  1. Download this incomplete server.js file (https://github.com/Akryum/packt-vue-project-guide/blob/master/chapter7-download/server.dev.js) and put it in the project root directory. It already creates an express server and configures the necessary express routes.

For now, we will focus on the development part.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.2.15