Skip to content

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.

Notifications You must be signed in to change notification settings

Mostafa-wael/Polyglot-URL-Shortener

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

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.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published