Giter Site home page Giter Site logo

chibuike-edmund / flaskcampaign Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 10.6 MB

This repository contains a simple Flask application and instructions for deploying it on Vercel.

Home Page: https://quest1-oklrmsyag-chi-buik3s-projects.vercel.app/

Python 99.64% PowerShell 0.09% Shell 0.03% C 0.07% JavaScript 0.10% CSS 0.06% HTML 0.01%
flask python vercel-deployment

flaskcampaign's Introduction

Flask App Deployment with Vercel

This repository contains a simple Flask application and instructions for deploying it on Vercel.

Flask Application

This Flask application serves a basic "Hello World!" response.

Code

from flask import Flask

app = Flask(__name__)

@app.route('/')
def hello_world():
    return 'Hello World!'

if __name__ == '__main__':
    app.run()

Deployment on Vercel

To deploy this Flask application on Vercel, follow these steps:

Prerequisites

  • A Vercel account. Sign up at Vercel.

  • Vercel CLI installed. You can install it using npm:

    npm install -g vercel

Steps

  1. Fork or Clone the Repository:

    • Fork this repository or clone it to your local machine.

      git clone https://github.com/yourusername/your-repo-name.git
      cd your-repo-name
  2. Create a vercel.json File:

    • Create a vercel.json file in the root directory of your project with the following content:

      {
        "version": 2,
        "builds": [
          {
            "src": "app.py",
            "use": "@vercel/python"
          }
        ],
        "routes": [
          {
            "src": "/(.*)",
            "dest": "app.py"
          }
        ]
      }
  3. Login to Vercel:

    • Log in to your Vercel account using the Vercel CLI.

      vercel login
  4. Deploy the Application:

    • Deploy your application to Vercel.

      vercel
  5. Follow the Prompts:

    • Follow the prompts to complete the deployment. Vercel will ask for the project name, the directory containing your project, and other settings. Accept the default settings or customize as needed.
  6. Access Your Deployed Application:

    • After deployment is complete, Vercel will provide you with a URL where your Flask application is live.

Additional Notes

  • Ensure that your requirements.txt file lists all necessary dependencies for your Flask application.
  • For more advanced configurations, refer to the Vercel documentation.

License

Unlicensed

flaskcampaign's People

Contributors

chibuike-edmund 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.