Coder Social home page Coder Social logo

mostafa-wael / polyglot-url-shortener Goto Github PK

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

This example shows how to create a URL shortener using multiple languages. In this example project I used Python and NodeJS along with Metacall to run the application.

Python 41.83% JavaScript 58.17%
metacall nodejs polyglot python url-shortener

polyglot-url-shortener's Introduction

MetaCall Polyglot URL Shortener

This example shows how to create a URL shortener using multiple languages and deploy it to the cloud. In this example project we are using Python and NodeJS along with Metacall to run the application.

Instructions

  1. Install metacall:
    • curl -sL https://raw.githubusercontent.com/metacall/install/master/install.sh | sh
  2. Install the requirements:
    • metacall pip3 install -r requirements.txt
    • or metacall pip3 install requests

Run the application locally

  1. Run the application using metacall:
    • metacall main.js

Run the application in the cloud

  1. Deploy the application through the dashboard
  2. Test the application
    1. Through your browser:
      • https://api.metacall.io/{user name}/{deployment name}/{deployment version}/call/shorten?url=
    2. Using curl:
      • curl -X POST https://api.metacall.io/{user name}/{deployment name}/{deployment version}/call/shorten --data '{ "url": "https://github.com/Mostafa-wael" }'

You can copy the deployment URL from the dashboard too.

polyglot-url-shortener's People

Contributors

mostafa-wael avatar

Stargazers

 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.