JSPM

  • Created
  • Published
  • Downloads 62
  • Score
    100M100P100Q97297F
  • 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

npm package version tests status

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

  • express for serving files

Running

$ [PORT=4200] yarn chef-express folder [--debug]
const startServer = require("chef-express");

startServer({
  // this enables http/ws logs
  debug: process.argv.includes("--debug"),
  // port on which the server listens
  port: Number(process.env.PORT || 4200),
  // folder to static server files
  folder: process.argv[2],
}).then((server) => {
  // server api is get, post, any
  server.any("/*", (res, req) => {
    res.end("200 OK");
  });
});
  • PORT=4200 - choose server port
  • folder - folder you want to server static files from
  • --debug - show logs

Install

$ yarn add chef-express

License

MIT