0.3.0 • Published 1 year ago

@head/edge v0.3.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

@head/edge

// service.js
import Application from '@head/edge';
import $rpc from '/path/to/user-rpc';

const { router, client } = new Application();

router.verb('GET', '/api/users', async (ctx, next) => {
  const data = await $rpc.doPost('/path-to/userService');
  ctx.body = data;
  next();
});

export default client;

// store.js
import $client from './service';

async function init() {
  const data = await $client.get('/api/users');
  state.users = data;
}

delegates @1.0.0 / 2015-12-14

path-to-regexp @6.2.1 / 2022-05-07

Koa @2.13.4 / 2021-10-19

Koa Compose @4.2.0 / 2020-09-11

Koa Router @11.0.1 / 2022-07-04

0.3.0

1 year ago

0.2.1

1 year ago

0.2.0

1 year ago

0.1.1

3 years ago

0.1.0

3 years ago