Skip to content
This repository was archived by the owner on Oct 10, 2021. It is now read-only.

markwylde/https-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HTTPS Server for Chrome Apps

This library is made specifically for running an HTTPS server as a ChromeOS app.

Usage

You can call get, post, put, delete or patch just like in Express to create a route.

When called the routes will be given a req and res. Currently you can get an array of raw headers on req, and for mutatable methods you can get the body via req.body.

To send a response you call res.send or res.sendFile.

Example

The dist/https-server.js has been built with browserify but you can just load it into the webpage and access it via the window object for testing.

const https = new ServerHttps()

https.get('/', function (req, res) {
  res.send('hello there')
})

https.listen(9999)

Demo

You can view the https-server-demo for a more advanced demo

License

This project is licensed under the terms of the GPLv3 license.

About

An https server for chrome apps

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors