open-index/open-npm huggingface dataset:
npm package: @sureking/server
Description: @sureking/server是基于Koa、GraphQL搭建的服务程序
Latest version: 1.0.14

# @sureking/server 使用说明
## 介绍
@sureking/server是基于Koa、GraphQL搭建的服务程序

## 安装

> 目前属于实验阶段，npm i @sureking/server

## 使用

```
import server from '@sureking/server`

server.listen({
  models, // 数据处理模型程序
  auth, // 服务器请求验证方法
  handlers // 自定义Koa解决器
})
```

## 参数说明


### models // 数据处理模型程序

如定义Test为数据处理模型则
```
import Test from './models/test`
{
  models: {test: Test}
}
```

### 请求验证方法 返回Boolean true-请求通过 false-请求被拒绝
```
{
  auth(request /*请求对象，等同于Koa的ctx.request对象*/){
    // 验证提交数据内容，如token或sessionid
    return true
  }
}
```
### 自定义Koa解决器

```
handlers: [
  async function (ctx, next) {
    if (ctx.path.indexOf('/test') > -1) {
      ctx.body = await 'foo'
    } else {
      await next()
    }
  }
]
```
npm package: @surelybrackets/inspector-f
Description: API for getting historical stock/etf statistics.
Author: Matthew Bunch
Latest version: 0.6.12

# inspector-f

inspector-F assists stock and ETF traders with market research and analysis, by allowing them to inspect market prices and statistics relative to provided date ranges.

## Installing the repo

First time clone and install.
```sh
git clone https://github.com/surelybrackets/inspector-f.git
npm run init
```

## Provided commands

#### Building the server files

The sources files for this express server are written in typescript and will need to be transpiled to javascript before being deployed to any server. To generate necessary javascript files, run:
```sh
npm run build
```
Javascript files will be stored in the `./dist` directory.

#### Running the server

To serve a static build of the server, run:
```sh
npm run start
```

To run a hot reloading development server, run:
```sh
npm run start:dev
```

To run the server in a detach docker container, run (this requires docker and docker-compose to be installed):
```sh
npm run start:prod
```

#### Tests

Unit test are written with jest and can be run with:
```sh
npm run test
```
Unit tests must pass before code is pushed to remote.

Linting has been configured to maintain code consistency. To check changes against rules, run:
```sh
npm run lint
```
Linting is running on the pre-commit hook. To view rules, refer to the `.eslintrc.js` configuration file.