Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

koa-architect

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

koa-architect - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

2

package.json
{
"name": "koa-architect",
"version": "1.0.2",
"version": "1.0.3",
"homepage": "https://github.com/nervgh/koa-architect",

@@ -5,0 +5,0 @@ "main": "lib/architect.js",

@@ -52,18 +52,11 @@ # koa-architect

![img](./screenshot.png)
![example](./screenshot.png)
```
middleware/
middleware/01-foo/
middleware/01-foo/index.js
middleware/02-bar/
middleware/02-bar/index.js
middleware/route/
middleware/route/index.js
middleware/nested/
middleware/nested/index.js
middleware/nested/middleware/
middleware/nested/middleware/index/
middleware/nested/middleware/index/index.js
middleware/nested/middleware/baz/
middleware/nested/middleware/baz/index.js

@@ -73,2 +66,3 @@ ```

```js
// Middleware
module.exports = function (ctx, next) {

@@ -82,2 +76,3 @@ // Doing here some work and go next

```js
// Middleware
module.exports = function (ctx, next) {

@@ -91,2 +86,3 @@ // Doing here some work and go next

```js
// Routes
exports.get = {

@@ -106,2 +102,4 @@ 'index': function (ctx) {

```js
// Nested middleware and/or routes
const path = require('path')

@@ -117,2 +115,3 @@ const architect = require('koa-architect')

```js
// Routes
exports.use = function (ctx) {

@@ -124,2 +123,3 @@ ctx.response.body = ctx.originalUrl

```js
// Routes
exports.get = {

@@ -126,0 +126,0 @@ 'index': function (ctx) {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc