GithubHelp home page GithubHelp logo

5ouma / reproxy Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 97 KB

🚚 Deliver any files in the GitHub repository

Home Page: https://reproxy.deno.dev

License: MIT License

TypeScript 100.00%
curl deno file github install oneliner redirect repository typescript reproxy hono

reproxy's Issues

Publish a release when merging to the main branch

✏️ Describe the feature

Currently, I publish a release manually, but it's better to have an auto-release method.

  • Publish a GitHub Releases
  • Publish to JSR

βœ”οΈŽ Confirm these checks

πŸ—’οΈ Additional Information

No response

Rearrange the directory structure

✏️ Describe the feature

Currently, this repo has src and test directories in the root directory.
However, having test codes in the same directory in src like Go projects might be good.

βœ”οΈŽ Confirm these checks

πŸ—’οΈ Additional Information

No response

Add document comments

✏️ Describe the feature

Writing code is much easier with JSDoc.
It's also good for JSR.

βœ”οΈŽ Confirm these checks

πŸ—’οΈ Additional Information

No response

Use @hono/hono

✏️ Describe the feature

@oak/oak isn’t maintained actively now.
Hono has more useful features.

βœ”οΈŽ Confirm these checks

πŸ—’οΈ Additional Information

No response

Dynamic file type support

✏️ Describe the feature

Currently, it responds to the request with contents as text/plain so they must be code files. However, some people might specify non-text files such as images or videos, so it should detect the file type and change the response MIME type.

βœ”οΈŽ Confirm these checks

πŸ—’οΈ Additional Information

reproxy/src/router.ts

Lines 4 to 14 in 1bb2d1f

export const router = new Router();
router
.get("/", async <R extends string>(ctx: RouterContext<R>) => {
ctx.response.type = "text/plain";
if (!redirect(ctx, ctx.request.userAgent)) await getContent(ctx);
})
.get("/:ref", async <R extends string>(ctx: RouterContext<R>) => {
const ref: string | undefined = ctx.params.ref;
ctx.response.type = "text/plain";
if (!redirect(ctx, ctx.request.userAgent, ref)) await getContent(ctx, ref);
});

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.