https://github.com/kanocomputing/kano-es6-server
Development server resolving modules by name with no build time
https://github.com/kanocomputing/kano-es6-server
Last synced: about 1 year ago
JSON representation
Development server resolving modules by name with no build time
- Host: GitHub
- URL: https://github.com/kanocomputing/kano-es6-server
- Owner: KanoComputing
- Created: 2018-11-26T11:53:55.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-04-29T09:35:49.000Z (about 7 years ago)
- Last Synced: 2025-01-13T12:46:12.034Z (over 1 year ago)
- Language: JavaScript
- Size: 19.5 KB
- Stars: 1
- Watchers: 20
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ES6 Server
CLI built with connect to serve development files. Named modules in js and html files will be resolved against the `node_modules` directory and replaced with their relative path.
Example:
In source file:
```js
import { add } from 'math-lib/index.js';
```
Will be sent by this server as:
```js
import { add } from './node_modules/math-lib/index.js';
```
If the module cannot be resolved, it will be left as is and the browser will throw an error about the named module.
## Usage
```
es6-server # Serves the current directory on port 4000
es6-server ./subdir # Serves the provided directory on port 4000
es6-server --port 7000 # Serves the current directory on port 7000
es6-server --port 0 # Serves the current directory on a randomized port
```