Coder Social home page Coder Social logo

nikolasmelui / servest Goto Github PK

View Code? Open in Web Editor NEW

This project forked from keroxp/servest

0.0 2.0 0.0 666 KB

🌾A progressive http server for Deno🌾

Home Page: https://servestjs.org

License: MIT License

Makefile 0.26% TypeScript 94.72% Go 0.14% JavaScript 0.30% CSS 3.57% Dockerfile 0.56% HTML 0.45%

servest's Introduction

servest

Build Status https://img.shields.io/github/tag/keroxp/servest.svg license

🌾A progressive http server for Deno🌾

Description

Servest is a http module suite for Deno. It is composed of three major APIs of HTTP protocol:

  • App API: General puropose HTTP routing server.
  • Server API: Low-level HTTP API for processing HTTP/1.1 requests.
  • Agent API: Low-level API for managing HTTP/1.1 Keep-Alive connection to the host.

In order to experiment and be progressive, we have our own implementation of HTTP/1.1 server apart from std/http.

Usage

To get a more detailed information, go to https://servestjs.org

// @deno-types="https://servestjs.org/@/types/react/index.d.ts"
import React from "https://dev.jspm.io/react/index.js";
// @deno-types="https://servestjs.org/@/types/react-dom/server/index.d.ts"
import ReactDOMServer from "https://dev.jspm.io/react-dom/server.js";
import { createApp } from "https://servestjs.org/@/mod.ts";

const app = createApp();
app.handle("/", async req => {
  await req.respond({
    status: 200,
    headers: new Headers({
      "content-type": "text/html; charset=UTF-8"
    }),
    body: ReactDOMServer.renderToString(
      <html>
        <head>
          <meta charSet="utf-8" />
          <title>servest</title>
        </head>
        <body>Hello Servest!</body>
      </html>
    )
  });
});
app.listen({port: 8888});

License

MIT

servest's People

Contributors

keroxp avatar github-actions[bot] avatar anshuraj avatar hoangpq avatar iwatakeshi avatar coil398 avatar maplecfiv avatar kawamataryo avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.