Giter Club home page Giter Club logo

denofn-selfhosted's Introduction

denofn logo

denofn-selfhosted

Self-hosted Deno functions, made with Deno and Docker

denofn UI screenshot


Preface

Combining a love for Typescript and all things serverless, denofn started as a little project to also get reaquainted with Deno and Docker. It's currently running stable locally on UNIX development machines and on a Digitalocean droplet+volume.

Documentation

The old docs are quite outdated and in need of a big rewrite, but it's currently the best place to get started.

denofn-selfhosted's People

Contributors

dependabot[bot] avatar github-actions[bot] avatar jeroenptrs 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

Watchers

 avatar  avatar

denofn-selfhosted's Issues

UI Tests

  • start with adding snapshots for style consistency
  • add workflow for UI tests

Move away from external routing library

Might be best to cherrypick implementations of routers and gradually introduce them to the application.
#23 has shown that small - but breaking - changes can halt the process incredibly (instead of patching things myself I'm now dependent on others) and this might not break something that quick but it's still nice to safely reside on the current version of Deno.

[Testing] Improve testing

These files need testing:

Execution

  • handleProxy.ts obsolete with new library
  • index.ts split attachHandlers in separate file to make testable, the rest doesn't need any tests
  • registerScriptHandler.ts (do this in #20)
  • spawn.ts

Registry

  • index.ts split checkRegistry into sizable chunks [done in #12]

Micro

  • the whole library :)

Shared

  • none

Registry UI

  • test API with something like superagent

[UI] use service worker and code splitting

prettier and code editors shouldn't be loaded in immediately, and neither should the same resource be loaded in every time.
Thus the solution is two fold:

  • add a caching strategy with the CRA added service worker (also provide a pop-up to update!)
  • use dynamic imports on hungry dependencies like prettier, react code editor, react selectable

[micro/router] urls not resolving correctly

Prerequisites

  • create route at /helloWorld

Expectations

  1. navigate to /helloWorld [this should work]
  2. navigate to /helloWorld?vcokjabfasdl [this should work]
  3. navigate to /helloWorldvcokjabfasdl [this should NOT work]

Reality

  1. this works
  2. this works
  3. this works

Description

Routing should be more strict in resolving URLS

[Execution] registerScriptHandler needs to be more naïve

Pretty sure this will scale better once moving to a swarm or load balanced instances.

  • check incoming request that's not api/static and check if it's a registered script
  • if not, decline request or pass through (on static files you want to pass through)
  • if it is, enter scriptHandler

Use std/log

Move crappy built-in logging to std's logger, would be nice to still have [Registry] and [Execution] prefixes but it's a nice to have.

Ditch the crap formatting, it looks fine in Papertrail

Publish script

Something like lerna version but for Deno would be nice. But I see it the following way:

  • register files that indicate denoFn versions (execution/deps.ts, registry/deps.ts, templates/bundle.ts)

  • bump these files
    no longer needing, not pinning to a specific CDN anymore.

  • simple git wrapper that commits release version + tag and pushes all to origin no that much work to do manually for now. Skipping

Registry Application

Might be best to use CRA / nodejs for development for this. Serving will still happen in Deno land.

  • use Auth0 to lock behind one user
  • start with only allowing to upload an index.ts (or inline text editor? like webtask?)
  • set/update registry config in app
  • registry API functions written in registry, exported in mod.ts, imported as endpoints in execution
  • serve in execution
  • disallow reserved filenames
  • serve static

[Execution] improve API routing library

  • Investigate whether we're using Opine/Opine HTTP Proxy correctly
  • Either contribute to the project or abandon for custom implementation (preferably we want to contribute)

Split up Readme in proper documentation

It's a mess right now, I'm already adding several todo's as issues instead of in the Readme.
I prefer keeping it as .md files in a docs folder, but I'm partial to something like Docusaurus as well.

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.