0.0.6 • Published 8 months ago

chttps.js v0.0.6

Weekly downloads
-
License
-
Repository
-
Last release
8 months ago

chttps

Webserver made for TypeScript, using TypeScript.

import { CHTTPServer } from "chttps";

const server = new CHTTPServer(8080);

server.use(function testWare(req, res) {
    return new Promise((resolve, reject) => {
        resolve("TestData")
    })
})

server.listen();

Functionality

  • Full Bun support
    • Made using standard Node.js libraries, purposed to be used with Bun
  • Asynchronous and promised
    • Middleware and routes are made using promises, ensuring a blazingly fast server.
    • Public files are served asynchronously alongside coded paths.
    • Easy filesystem layout instead of spaghetti-code files.

File structure

  • 📁 server
    • 📁 get - GET endpoint controller files.
      • 🗒️main.ts - example GET controller.
    • 📁 post - POST endpoint controller files.
      • 🗒️hello.ts - example POST controller
    • 📁 public - Public files.
      • 🗒️moveButton.js - example served file.
      • 🗒️adminPage.html - example served file.
  • 🗒️entry.ts - Entry point for server

‼️ Every folder MUST exist, but can be empty. ‼️

0.0.6

8 months ago

0.0.5

8 months ago

0.0.4

8 months ago

0.0.3

8 months ago

0.0.2

8 months ago

0.0.1

8 months ago