November 2018
Beginner
132 pages
2h 57m
English
To get started with starting a server in Koa, we should first create a project directory and enter that directory. We can do so with the following commands:
mkdir koa-servercd koa-server
Next, we initialize a project in npm with the following command:
npm init
After running this command, follow the prompts to help create a package.json file for your project.
Next, we can install Koa to our project with the following command:
npm i koa
Now that we have Koa installed, we can create our server file. Let's call the file index.js. If you are using a Unix-based operating system such as Linux or macOS, you can create the file ...
Read now
Unlock full access