0.3.1 • Published 4 years ago

@forge-io/simpleh2 v0.3.1

Weekly downloads
5
License
GPL-3.0
Repository
github
Last release
4 years ago

Welcome to @forge-io/simpleh2 👋

Version Documentation Maintenance License: GPL--3.0

A simple HTTP2 router for nodejs

🏠 Homepage

📕 Repository

Install

npm install @forge-io/simpleh2

Example

HTTP2

const simpleH2 = require('@forge-io/simpleh2');
const srv = new simpleH2.Server();
srv.get('/', (stream, headers, params, next) => {
  next('Hello, world!');
});
srv.listen(3001);

HTTP2 With SSL

const fs = require('fs');
const simpleH2 = require('@forge-io/simpleh2');
const srv = new simpleH2.Server({
  key: fs.readFileSync('key.private.pem', 'utf8'),
  cert: fs.readFileSync('cert.pem', 'utf8'),
});
srv.get('/', (stream, headers, params, next) => {
  next('Hello, world!');
});
srv.listen(3001);

🤝 Contributing

Contributions, issues and feature requests are welcome!

Feel free to check issues page.

Show your support

Give a ⭐️ if this project helped you!

0.3.1

4 years ago

0.3.0

4 years ago

0.1.2

4 years ago

0.2.0

4 years ago

0.1.1

4 years ago