You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+22-10Lines changed: 22 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,8 @@
1
1
<atarget="_blank"href="https://chrome.google.com/webstore/detail/web-server-for-chrome/ofhbbkphhbklhfoeikjpcbhemlocgigb"></a>
2
2
3
-
# Chrome Web Server - an HTTP web server for Chrome (chrome.sockets)
@@ -28,8 +30,7 @@ How to include into your own chrome app
28
30
29
31
run minimize.sh to concatenate all the required files together and then include the resulting wsc-chrome.min.js in your project. Here is an example of another project's usage: https://github.com/zebradog/kiosk/blob/f7a398f697edc1c22b90c14f959779f1e850012a/src/js/main.js#L124
30
32
31
-
===
32
-
Basic usage:
33
+
### Basic usage:
33
34
34
35
```
35
36
var app = new WSC.WebApplication(options)
@@ -82,14 +83,25 @@ handlers is an array of 2 element arrays where the first item is a regular expre
82
83
```
83
84
84
85
85
-
====
86
-
Building
87
-
====
88
-
Unfortunately there is a build process if you want to run this from source directly because I am using a Polymer (polymer-project.org) user interface. There is a bower.json in the polymer-ui folder and you will need to install node+npm+bower and then run bower install from that folder. Oh, and then you will need to "Refactor for CSP" (chrome apps do not allow inline scripts), one way of doing this is using https://chrome.google.com/webstore/detail/chrome-dev-editor-develop/pnoffddplpippgcfjdhbmhkofpnaalpg (open the folder and right click and select refactor for CSP)
89
86
90
-
I'm now using a script that can do this (look in polymer-ui/build.sh. You'll need to npm install -g vulcanize crisper)
87
+
### Building
88
+
89
+
```
90
+
cd web-server-chrome
91
+
cd makedeps
92
+
npm install
93
+
npm run make # this builds the app dependencies such as react and material-ui into a bundle
94
+
cd ../react-ui
95
+
npm run watch # Press ctrl-c if you just want to build it once.
96
+
# press ctrl-C if you are done editing
97
+
cd ../
98
+
bash package.sh
99
+
```
100
+
101
+
This creates package.zip, which can then be distributed.
0 commit comments