JSPM

  • Created
  • Published
  • Downloads 62
  • Score
    100M100P100Q97361F
  • License MIT

chef-js + express = static files server

Package Exports

  • chef-express
  • chef-express/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (chef-express) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

chef-express

kisscc0

npm package version tests status

static files server designed for node written in typescript, with tests

  • express for routing

Command-Line Running

$ npx chef-express folder [--debug] [--ssl] [--port 443] [--maxCacheSize 0]

Installation

$ yarn add chef-express

Minimal configuration is specifying folder, then it serves it from http://localhost:3000

const startServer = require("chef-express");
const config = { folder: "docs" };

startServer(config).then((server: Express.Application) => {
  // server router api is get, post, any
  server.any("/*", (req: Express.Request, res: Express.Response) => {
    res.end("200 OK");
  });
});

License

MIT