Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/chef-js/express
- Owner: chef-js
- Created: 2022-02-10T16:58:49.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-06-11T20:26:41.000Z (over 1 year ago)
- Last Synced: 2024-05-10T13:21:34.618Z (9 months ago)
- Topics: cli, express, http-server, javascript, nodejs, nodejs-server, typescript
- Language: JavaScript
- Homepage:
- Size: 208 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# chef-express
**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