JSPM

  • Created
  • Published
  • Downloads 56
  • Score
    100M100P100Q97213F
  • License MIT

static files server = chef-express

Package Exports

  • chef-express
  • chef-express/dist/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 version build status

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

  • express for routing

Serve folder CLI

$ npx chef-express folder

Serve folder node.js

const { cook } = require("chef-express");

cook({ folder: "folder" }).then((server: Express.Application) => {
  // server api is get, post, any
  server.any("/*", (req: Express.Request, res: Express.Response) => {
    res.end("200 OK");
  });
});
  • minimal configuration is zero configuration, all values have defaults
  • if folder param is omitted default index.html is read from folder = '.'
  • serves from http://localhost:3000 unless port specified

Configuration

For more information about config parameters read:

License

MIT