You can host your specific file on the GitHub repository. The usage I assume is
for one-line scripts. (i.e. dotfiles or some install scripts, like
curl https://example.com | sh
)
If you access from browsers, you'll redirected to the GitHub page, not a raw file.
For the development or testing, you can access to the different branches or
tags. To do this, simply add the ref name to the sub-directory. (i.e.
curl https://example.com/ref | sh
)
-
Copy the
.env.tmpl
to.env
and edit as you prefer -
Follow the steps depending on the runtime
-
-
Run this command
deno serve -A --env-file='.env' jsr:@5ouma/reproxy
-
-
-
Add this code to the
index.ts
export { default } from "@5ouma/reproxy";
-
Run these commands
bunx jsr add @5ouma/reproxy bun run index.ts
-
-
-
Add this code to the
index.js
import { serve } from "@hono/node-server"; import app from "@5ouma/reproxy"; serve(app);
-
Run these commands
npm install @hono/node-server npx jsr add @5ouma/reproxy node run index.js
-
-
π¦ Use Deno Deploy
-
Replace the default code with this
export { default } from "jsr:@5ouma/reproxy";
-
Set the environment variables (Don't forget!!)
β οΈ Use Cloudflare Workers
-
Set up the
wrangler.toml
-
Add this code to the
index.ts
export { default } from "@5ouma/reproxy";
-
Deploy with these commands
npx jsr add @5ouma/reproxy npx wrangler deploy index.ts
-
Clone this repository
git clone https://github.com/5ouma/reproxy.git
-
Copy the
.env.tmpl
to.env
and edit as you prefer -
Run the
server.ts
via these task runners# For production deno task start
# For development deno task dev
Name | Required |
---|---|
REPOSITORY_OWNER |
yes |
REPOSITORY_NAME |
yes |
REPOSITORY_PATH |
yes |
GITHUB_TOKEN |
no |
Note
You need to add GITHUB_TOKEN
if you want to:
- Access the file in the private repository
- Avoid the API usage limit
β οΈ Issues: Feature Requests or Bug Reports- π¬ Discussions: General Chats or Questions
- π‘οΈ Security Advisories: Security Issues that should not be public
I happily welcome your contributions! Before you contribute, I would recommend reading CONTRIBUTING.md for a better development experience.