Installing dependencies

We will be making use of the external dependencies listed here:

  • koa: Our base framework.
  • koa-router: RESTful Routing middleware for Koa
  • koa-logger: Development style logger middleware for Koa
  • koa-body: Request body parser middleware for Koa
  • koa-session: Session middleware for Koa
  • koa-views: Template rendering middleware for Koa
  • mongoose: Object data modeling (ODM) library for MongoDB and Node.js
  • mongoose-unique-validator: Unique constraint validator plugin for mongoose
  • ejs: Templating language for JavaScript
  • bcrypt: Password-hashing library for Node

To install the required dependencies, we can run the following command:

npm install --save koa koa-router koa-logger koa-body koa-views koa-session mongoose mongoose-unique-validator ejs bcrypt
With newer versions of npm, you do not need to specify the --save flag for installed packages to be added as dependencies in the package.json file. You can simply install and save dependencies with npm install or npm i.
..................Content has been hidden....................

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