Git Product home page Git Product logo

router's Introduction

router

Serves my website and acts as a URL shortener

This is currently deployed on Vercel and the links are stored in an Airtable base. This does have the unintended side effect of my links not working when Airtable goes down, so I need to think of a solution to that, but I'm not really interested in using an actual database and then having to make some sort of UI to manage links, so it will stay as is for now.

Here's my Airtable base: https://airtable.com/shrJNnm6FZJgwBEev

Try it at v0.jasonaa.me and v0.jasonaa.me/github!

To deploy this on Vercel, just click this button! Make sure you set these environmental variables! AIRTABLE_API_KEY, AIRTABLE_BASE_ID, DEFAULT_URL

Deploy to Vercel

You'll probably need to make some changes in vercel.json. Here's a sample vercel.json. These are the 2 required routes, but you can add more. Don't delete these, as they are required to make the app work, but you can edit the / route to go to the URL of your actual site.

{
    "routes": [
        { "src": "/", "dest": "https://wherever.yoursite.is/" },
        { "src": "/(.*)", "dest": "/api/main?redir=$1" }
    ]
}

router's People

Contributors

dependabot[bot] avatar jasonappah avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  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.