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

4.2.3 • Public • Published

Nexys web framework

Test Package Publish NPM package NPM package Prettier

Nexys typescript web framework (built on top of Koa and Nexys System SDK)

Setup

App init

see /server for example implementation or https://github.com/nexys-system/server-boilerplate

Cache Initialization

path suggestion: src/service/cache.ts

import { Cache } from '@nexys/core';
export default new Cache.Local({persistent: true });

Middleware Auth

path suggestion: src/middleware/auth.ts

import { Middleware} from '@nexys/core';
import * as Login from '../service/login';
import cache from '../service/cache';

// initalizes the middleware auth with
// - `Profile` defines the JWT Profile shape
// - `UserCache` defines the shape of the information saved in the userCache
// - `cache`reference to the cache
export default new Middleware.Auth<Login.Profile, Login.UserCache>(cache);

Associated projects

Readme

Keywords

none

Package Sidebar

Install

npm i @nexys/core

Weekly Downloads

59

Version

4.2.3

License

AGPL-3.0

Unpacked Size

147 kB

Total Files

86

Last publish

Collaborators

  • nexys