UNPKG

lemon-core

Version:
39 lines (38 loc) 1.28 kB
/** * Express Server Application. * - standalone http service with express. * * * ```bash * #run-server (use lemon.yml:local) * $ npm install -g nodemon * $ ENV=lemon STAGE=local nodemon express.js * ``` * * [TODO] * - [ ] 190801 proper content type `text/plain` * - [x] 190801 change router underscore char like `loopers_front` -> `loopers-front` * * * @author Steve Jung <steve@lemoncloud.io> * @date 2019-07-31 support ECMA 2016. * @date 2019-08-01a auto register api with pattern. `/^[a-z][a-z0-9\-_]+$/` * @date 2019-08-07 ignore `engine.dt` function. * @date 2019-11-26 cleanup and optimized for `lemon-core#v2` * @date 2020-01-23 improve context information via headers. * * @copyright (C) lemoncloud.io 2019 - All Rights Reserved. */ import { LemonEngine } from '../engine/'; import { LambdaWEBHandler } from '../cores/lambda/lambda-web-handler'; import express from 'express'; export declare const buildHeaderGetter: (headers: any) => (name: string) => string; export declare const buildExpress: ($engine: LemonEngine, $web: LambdaWEBHandler, options?: { argv?: string[]; prefix?: string; genRequestId?: () => string; }) => { express: () => any; app: any; createServer: () => any; };