@nfly/core
TypeScript icon, indicating that this package has built-in type declarations

1.1.6 • Public • Published

Install

pnpm add @nfly/core

usage

import { createNFly } from '@nfly/core';

createNFly({
  port: 8008,
  root: __dirname, // __dirname 
  bodyOptions: {}, // koa-body default disable
  router: registerRouter('/api'), // register router
  callback() {
    console.log('app server');
  },
}).start(); // start 

use middleware in Order

# create middleware/_config.ts

import { MiddlewareConfig } from '@nfly/core';
import view from './view';


const config: MiddlewareConfig = [
	{
		name: 'view',
		disable: false,
		handler: view,
	},
]
export default config;

use @nfly/cli create demo.

Package Sidebar

Install

npm i @nfly/core

Weekly Downloads

0

Version

1.1.6

License

ISC

Unpacked Size

18.1 kB

Total Files

22

Last publish

Collaborators

  • mingetian