
Security News
Meet Socket at Black Hat and DEF CON 2025 in Las Vegas
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
generator-koa-api
Advanced tools
Yeoman generator
Not every new computer comes with a Yeoman pre-installed. He lives in the npm package repository. You only have to ask for him once, then he packs up and moves into your hard drive. Make sure you clean up, he likes new and shiny things.
npm install -g yo
Yeoman travels light. He didn't pack any generators when he moved in. You can think of a generator like a plug-in. You get to choose what type of application you wish to create, such as a Backbone application or even a Chrome extension.
To install generator-koa-api from npm, run:
npm install -g generator-koa-api
Finally, initiate the generators:
yo koa-api your-api # Initialize project
yo koa-api:api /tasks # Generate router and test files
yo koa-api:api /tasks/results # Nested routers!
yo koa-api:model task # Generate model for sequelize
After edit your configuration in config/
, run:
npm test # Run tests for APIs
npm start # Start server
6 steps to contribute:
# 1. Fork and clone this repo and `cd` to the repo
# 2. Link your `bin`s
npm link
# 3. Setup database for test
mysql -e 'create database database_test;'
# 4. Edit code and test
# 5. Run tests
npm test
# 6. Create pull request for your changes
npm start
, you can find your service's PID
by run pgrep your-api
because your starter file was named by name
field in your
package.json
.debug
for logging, so you can switch logs with DEBUG
environment
variable value.DEBUG
with path (e.g.,
your-api:api:/users).SQLs
by setting DEBUG=your-api:models
models/
.bin/sync-models.js
to create tables for models.this.app.models
.lib/loaders/
, so your can manage them
with best practice.api/
can be copy/move to anywhere with the same structure and run without any code.Yeoman has a heart of gold. He's a person with feelings and opinions, but he's very easy to work with. If you think he's too opinionated, he can be easily convinced.
If you'd like to get to know Yeoman better and meet some of his friends, Grunt and Bower, check out the complete Getting Started Guide.
MIT
FAQs
Yeoman generator
The npm package generator-koa-api receives a total of 0 weekly downloads. As such, generator-koa-api popularity was classified as not popular.
We found that generator-koa-api demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.