Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/chef-js/express

Command Line Interface Static Files Server written in TypeScript for Single Page Applications serving in Node with Express
https://github.com/chef-js/express

cli express http-server javascript nodejs nodejs-server typescript

Last synced: 2 months ago
JSON representation

Command Line Interface Static Files Server written in TypeScript for Single Page Applications serving in Node with Express

Awesome Lists containing this project

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

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

## Installation

```bash
$ yarn add chef-express
```

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

```ts
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