mirror of https://github.com/vladmandic/human
update dev server docs
parent
cb7e64e4ff
commit
a9c1394caf
26
Demos.md
26
Demos.md
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
Demos are included in `/demo`:
|
Demos are included in `/demo`:
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
**Browser**:
|
**Browser**:
|
||||||
- `index.html`: Full demo using Browser with ESM module, includes selectable backends and webworkers
|
- `index.html`: Full demo using Browser with ESM module, includes selectable backends and webworkers
|
||||||
it loads `dist/demo-browser-index.js` which is built from sources in `demo`, starting with `demo/browser`
|
it loads `dist/demo-browser-index.js` which is built from sources in `demo`, starting with `demo/browser`
|
||||||
|
@ -10,12 +12,28 @@ Demos are included in `/demo`:
|
||||||
*You can run browser demo either live from git pages, by serving demo folder from your web server or use
|
*You can run browser demo either live from git pages, by serving demo folder from your web server or use
|
||||||
included micro http2 server with source file monitoring and dynamic rebuild*
|
included micro http2 server with source file monitoring and dynamic rebuild*
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
### Dev Server
|
### Dev Server
|
||||||
|
|
||||||
To start micro http2 dev server, you must provide your own SSL certificate (production or self-signed)
|
To use dev server, you must have an SSL certificate since browsers enforce *https* for webcam access
|
||||||
and place them in `dev-server.js`
|
|
||||||
|
|
||||||
Once SSL certificates have been provided, simply run
|
You can use a provided ones self-signed certificate or configure your own
|
||||||
|
|
||||||
|
Self-signed test certificate was generated using:
|
||||||
|
```shell
|
||||||
|
openssl req -x509 -newkey rsa:4096 -nodes -keyout dev-server.key -out dev-server.crt -days 365 -subj "/C=US/ST=Florida/L=Miami/O=@vladmandic"
|
||||||
|
```
|
||||||
|
|
||||||
|
If you want to use your own certificate, edit `dev-server.js`:
|
||||||
|
```js
|
||||||
|
const options = {
|
||||||
|
key: fs.readFileSync('dev-server/dev-server.key'),
|
||||||
|
cert: fs.readFileSync('dev-server/dev-server.crt'),
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
Once SSL certificates have been provided (defalt test certificate or your own), simply run
|
||||||
```shell
|
```shell
|
||||||
npm run dev
|
npm run dev
|
||||||
```
|
```
|
||||||
|
@ -38,6 +56,8 @@ found 0 vulnerabilities
|
||||||
|
|
||||||
*If you want to test `wasm` or `webgpu` backends, enable loading in `index.html`*
|
*If you want to test `wasm` or `webgpu` backends, enable loading in `index.html`*
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
**NodeJS**:
|
**NodeJS**:
|
||||||
- `node.js`: Demo using NodeJS with CommonJS module
|
- `node.js`: Demo using NodeJS with CommonJS module
|
||||||
This is a very simple demo as althought `Human` library is compatible with NodeJS execution
|
This is a very simple demo as althought `Human` library is compatible with NodeJS execution
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
Welcome to the human wiki!
|
|
Loading…
Reference in New Issue