Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Server Side development with Node.js and Koa.js Quick Start Guide

You're reading from   Server Side development with Node.js and Koa.js Quick Start Guide Build robust and scalable web applications with modern JavaScript techniques

Arrow left icon
Product type Paperback
Published in Nov 2018
Publisher Packt
ISBN-13 9781789345391
Length 132 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Olayinka Omole Olayinka Omole
Author Profile Icon Olayinka Omole
Olayinka Omole
Arrow right icon
View More author details
Toc

Setting up a project

As usual, we will begin development locally by initializing a project with npm. We can run the following command to initialize our project:

npm init
// or npm init -y

Running npm init -y initializes the project with default values in the package.json file.

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...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image