GithubHelp home page GithubHelp logo

mystpi / glen Goto Github PK

View Code? Open in Web Editor NEW
48.0 48.0 2.0 1.2 MB

๐Ÿ•๏ธ A peaceful web framework for Gleam that targets JS.

Home Page: https://hexdocs.pm/glen/

License: MIT License

JavaScript 6.42% Gleam 93.58%
cloudflare-workers deno deno-deploy gleam gleam-lang javascript web web-framework

glen's Introduction

glen's People

Contributors

mystpi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

glen's Issues

Expose and document API using JS request and response types

It seems the only way to use this library is with Deno or other environments that have a very similar API, but internally this library works with any JS request and response.

It would be fab if functions were exposed to convert from a JS request into a Glen request, and from a Glen response into a JS response.

I would be tempted to also remove the custom serve function in favour of this, as it's quite convoluted to use unless the server you're using has exactly the same API as deno.

Thanks,
Louis

Consider always having the function in the last position

Hello!

Currently the serve function and other have the function first rather than last, which is the Gleam convention.

Having the function last would mean that they are suitable for use expressions, and the formatter will format them nicely.

pub fn main() {
  glen.serve(
    fn(request) {
      ...
    }
    8000,
  )
}

vs

pub fn main() {
  glen.serve(8000, fn(request) {
    ...
  })
}

Thanks,
Louis

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.