A structured boilerplate to create your Node app with Koa.js.
Create Koa Application is a cli tool to bootstrap a Koa.js application with a good environment preset and an alternative folder structure.
To install globally the tool:
npm install -g create-koa-application
Alternatively, you can use it with npx to create a new project:
npx create-koa-application <project-name>
Create a new application running on your terminal:
create-koa-application <project-name>
npm init koa-application <project-name>
yarn create koa-application <project-name>
After your project is correctly initialized
<project-name>
├── node_modules
├── index.js
├── server.js
├── package.json
├── package-lock.json
├── README.md
├── .env.example
├── .eslintrc.js
├── .eslintignore
├── .gitignore
├── .huskyrc
├── .prettierrc
├── .prettierignore
├── api
│ ├── users
│ │ ├── index.js
│ │ ├── user.routes.js
│ │ └── user.controller.js
│ ├── otherApiFolder
│ ├── ...
│ └── index.js
├── config
│ ├── components
│ │ ├── database.config.js
│ │ └── server.config.js
│ └── index.js
└── middleware
└── error.middleware.js
└── utils
└── generateId.util.js
This project is licensed under the MIT License - see the LICENSE.md file for details.