Giter Club home page Giter Club logo

uranus's Introduction

Uranus ๐Ÿช Web Framework

A web framework written in TypeScript for the Deno Runtime. Inspired by Flask, Express.js and ASP.net. Uranus is a minimal and unopinionated web framework for the Deno runtime.

import { UranusHTTP } from "../mod.ts";

const port = 3000;
const app = new UranusHTTP(port);

app.get("/{name}", (req, res) => {
    res.html(`<h1>Hello ${req.parameters.name}!</h1>`);
});

app.start(() => console.log(`Listening on: http://localhost:${port}`));

Features

  • HTTP Methods: GET, POST, DELETE, PUT and PATH
    • More are being implemented.
  • Body and Header: Every endpoint has access to the header and body of a HTTP request
  • URL Parameters: getting values out of the URL
  • Middlewares: Universal middlewares executed for all endpoints, and middlewares specified per endpoint.
  • Response Types: Multiple ways of responding to a request, think of files, JSON or redirecting.
  • Cookie Support: Using cookies without touching the HTTP header.
  • Serving Static files: Serve static file like .html with one function call.

Roadmap

What features are on the list to be implemented:

  • Support for Files: Support for file uploads in requests. And files in the response (I.E. *pdf, *.md).
    • No need to install dependencies.
  • Built-in Websockets: Built-in support for a websockets server.

Usage

To run an example:

  1. deno run --allow-net --allow-read --allow-write helloworld.ts

To import the library:

  1. Copy the uranusHTTP.ts file to your working directory.
  2. Past this: import { UranusHTTP } from "./uranusHTTP.ts"; in your *.ts file.

Permissions

Currently Uranus ๐Ÿช only uses these Deno permissions:

  • --allow-net
  • --allow-read
  • --allow-write

--allow-net is the only permission it will always needs.

uranus's People

Contributors

wouterpennings avatar

Stargazers

 avatar

Watchers

 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.