@scalar/void-server
v2.0.14
Published
Mirror for HTTP requests
Downloads
970
Readme
Scalar Void Server
An Hono server that responds with the request data. Kind of a mirror for HTTP requests.
It’s running on https://void.scalar.com, feel free to use it.
Examples
- https://void.scalar.com/
- https://void.scalar.com/404
- https://void.scalar.com/foobar.html
- https://void.scalar.com/foobar.json
- https://void.scalar.com/foobar.xml
- https://void.scalar.com/foobar.zip
- https://void.scalar.com/?foo=bar&foo=rab
Installation
npm add @scalar/void-server
Usage
import { serve } from '@hono/node-server'
import { createVoidServer } from '@scalar/void-server'
// Create the server instance
const app = await createVoidServer()
// Start the server
serve(
{
fetch: app.fetch,
port: 3000,
},
(info) => {
console.log(`Listening on http://localhost:${info.port}`)
},
)
Community
We are API nerds. You too? Let’s chat on Discord: https://discord.gg/scalar
License
The source code in this repository is licensed under MIT.