An HTTP Web Server for Chrome (chrome.socket API)
  • JavaScript 97.2%
  • HTML 2.8%
Find a file
2014-04-24 09:16:12 -07:00
200ok-16.png icons 2014-02-19 11:13:01 -08:00
200ok-19.png icons 2014-02-19 11:13:01 -08:00
200ok-32.png icons 2014-02-19 11:13:01 -08:00
200ok-38.png icons 2014-02-19 11:13:01 -08:00
200ok-48.png icons 2014-02-19 11:13:01 -08:00
200ok-64.png icons 2014-02-19 11:13:01 -08:00
200ok-96.png icons 2014-02-19 11:13:01 -08:00
200ok-128.png icons 2014-02-19 11:13:01 -08:00
200ok-256.png icons 2014-02-19 11:13:01 -08:00
200ok-512.png icons 2014-02-19 11:13:01 -08:00
background.js serve from entry 2014-02-20 10:52:36 -08:00
buffer.js add files 2014-02-19 09:10:40 -08:00
common.js handle HEAD 2014-03-10 10:52:17 -07:00
connection.js handle HEAD 2014-03-10 10:52:17 -07:00
cws_440x280.png add promotional artwork 2014-02-19 11:23:01 -08:00
cws_1280x800.png add promotional artwork 2014-02-19 11:23:01 -08:00
handlers.js handle HEAD 2014-03-10 10:52:17 -07:00
httplib.js stream large files (content range headers) 2014-02-20 17:22:56 -08:00
index.html fix index.html 2014-02-27 11:05:04 -08:00
index.js serve from entry 2014-02-20 10:52:36 -08:00
LICENSE Create LICENSE 2014-04-24 09:15:44 -07:00
manifest.json fix index.html 2014-02-27 11:05:04 -08:00
manifest.json.scratch add link 2014-02-20 11:03:30 -08:00
mime.js mime categories 2014-02-28 10:46:31 -08:00
README.md Update README.md 2014-04-24 09:16:12 -07:00
request.js fix request.arguments 2014-02-27 13:09:42 -08:00
stream.js handle HEAD 2014-03-10 10:52:17 -07:00
test.html stream large files (content range headers) 2014-02-20 17:22:56 -08:00
underscore.js workin' 2014-02-19 10:36:32 -08:00
webapp.js handle HEAD 2014-03-10 10:52:17 -07:00

Chrome Web Server - an HTTP web server for Chrome (chrome.socket)

Get it in the chrome web store: https://chrome.google.com/webstore/detail/web-server-for-chrome/ofhbbkphhbklhfoeikjpcbhemlocgigb

Here is an example project based on it: https://chrome.google.com/webstore/detail/flv-player/dhogabmliblgpadclikpkjfnnipeebjm

The default behavior right now is very simple. You choose a directory to serve static content. It is now able to stream large files and handle range requests. It also sets mime types correctly.

====

MIT license

I wrote this because the example app provided by google would lock and hang and had all sorts of nasty race conditions.

The design of this is inspired heavily by to the Python Tornado Web library. In this as well as that, you create an "app" which registers handlers. Then under the hood it will accept connections, create an HTTPConnection object, and that has an associated IOStream object which handles the nonblocking read/write events for you.