Configures webpackDevServer to allow hosting with gitpod.

master
nisarhassan12 5 years ago
parent 90bccf7eca
commit 5cf6fc78ce
  1. 3
      .gitpod.yml
  2. 4
      README.md
  3. 3
      scripts/webpack.config.dev.js

@ -1,6 +1,7 @@
tasks:
- command: gp await-port 3000 && gp preview $(gp url 3000)/examples/browser/demo.html
- init: npm install
command: npm start
ports:
- port: 3000
onOpen: open-preview
onOpen: ignore

@ -105,6 +105,10 @@ npm start
The development server will be available at http://localhost:3000/examples/browser/demo.html in your favorite browser.
It will automatically rebuild `tesseract.dev.js` and `worker.min.js` when you change files in the src folder.
You can also run the development server in Gitpod ( a free online IDE and dev environment for GitHub ) with a single click.
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/naptha/tesseract.js/blob/master/examples/browser/demo.html)
### Building Static Files
To build the compiled static files just execute the following:
```shell

@ -20,6 +20,9 @@ const genConfig = ({
},
}),
],
devServer: {
allowedHosts: ['localhost', '.gitpod.io'],
},
});
module.exports = [

Loading…
Cancel
Save