Git Product home page Git Product logo

aliaser's Introduction

Aliaser

Create aliases for long boring links with ease to use.

API Endpoints

[GET] /: Main landpage for users to interact.

[GET] /<alias>: Redirect to link with alias provided

[GET] /describe/<alias>: Get full details of specific alias

[POST] /add: add new alias with the following provided details in the payload:-

alias: name of the alias
link: link to be redirected at
owner: owner of the alias <optional>
category: category of the alias <optional>
site: site of the alias <optional>

[POST] /replace: add or overwrite existing alias with the following provided details in the payload:-

alias: name of the alias
link: link to be redirected at
owner: owner of the alias <optional>
category: category of the alias <optional>
site: site of the alias <optional>

[POST] /edit: edit existing alias with the following provided details in the payload:-

old_alias: name of the old alias to be replaced
new_alias: name of the new alias
link: link to be redirected at
owner: owner of the alias <optional>
site: site of the alias <optional>

[DELETE] /delete/<alias>: Deletes provided alias

Environment variables

  • HOST: host of aliaser (default is '0.0.0.0')
  • PORT: port of aliaser (default is 5000)
  • DEBUG: run aliaser in debug mode or not (Expected values are True or False defaults to True and if True, it runs under waitress)
  • BACKUP_SCHEDULE: how often backup thread should run in seconds (default is 3600)
  • REDIS_HOST: host of redis (default is localhost)
  • REDIS_PORT:port of redis (default is 6379)
  • GIT_MODE: Whether thread is going to backup on github or gitlab (expected values are GITHUB or GITLAB defaults to GITLAB)
  • GITHUB_RAW_FILE_LOCATION: locations.json file location in github to download it as a restore point (*mandatory field in case of GIT_MODE is GITHUB)
  • GITHUB_REPO: Repo of aliaser (eg. example/aliaser) (*mandatory field in case of GIT_MODE is GITHUB)
  • GITHUB_BRANCH: Branch of the project to push at (eg. main) (*mandatory field in case of GIT_MODE is GITHUB)
  • GITHUB_USER: user to be used to push with (eg. aliaser) (*mandatory field in case of GIT_MODE is GITHUB)
  • GITHUB_TOKEN: personal token to be used to push with (*mandatory field in case of GIT_MODE is GITHUB)
  • GITLAB_HOST: host of gitlab (defaults to http://localhost:80)
  • GITLAB_PROJECT_TOKEN: project token of aliaser in gitlab (*mandatory field in case of GIT_MODE is GITLAB)
  • GITLAB_PROJECT_ID: project id of aliaser in gitlab (eg. 80) (*mandatory field in case of GIT_MODE is GITLAB)
  • GITLAB_PROJECT_BRANCH: Branch of the project to push at (eg. main) (*mandatory field in case of GIT_MODE is GITLAB)

Components

Redis is used as caching

Flask for API

Backup to Github or Gitlab with filename locations.json

aliaser's People

Contributors

bssam1996 avatar

Watchers

 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.