Trying to deploy my application to Vercel, but its giving a
404: NOT_FOUND
Code: NOT_FOUND
Here is my vercel.json:
{
"version": 2,
"builds": [
{
"src": "./api/index.py",
"use": "@vercel/python"
}
],
"routes": [
{
"src": "/api/(.*)",
"dest": "/"
}
]
}
Here is my directory:
api index.py vercel.json requirements.txt
Here is my index.py:
from flask import Flask
app = Flask(__name__)
@app.route('/')
def index():
return 'Here is some information'
This is my requirements.txt:
Flask==0.12.2
Flask-WTF==0.14.2
google-pasta==0.1.7
python-dotenv==0.20.0
requests==2.22.0
virtualenv==20.4.2
virtualenv-clone==0.5.4
vonage==2.5.5
P.S. I know there’s extra libraries here right now that are not needed currently.
Tried deploying on vercel to production by pushing to main, deployed successfully, but not able to access anything.
Ansh Ajit is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.