next.js

ModuleNotFoundError no module named 'data', Vercel python

ModuleNotFoundError no module named 'data', Vercel python Question: I have data (data.py) which is file that contins constants. When I try to import the file which is in the same folder ‘/api’ it says that no module named ‘data’ I have it the same casing, and i dont understand what could be the reason why …

Total answers: 2

How to access FastAPI backend from a different machine/IP on the same local network?

How to access FastAPI backend from a different machine/IP on the same local network? Question: Both the FastAPI backend and the Next.js frontend are running on localost. On the same computer, the frontend makes API calls using fetch without any issues. However, on a different computer on the same network, e.g., on 192.168.x.x, the frontend …

Total answers: 2

How to post JSON data from JavaScript frontend to FastAPI backend?

How to post JSON data from JavaScript frontend to FastAPI backend? Question: I am trying to pass a value called ‘ethAddress’ from an input form on the client to FastAPI so that I can use it in a function to generate a matplotlib chart. I am using fetch to POST the inputted text in Charts.tsx …

Total answers: 1

How to display a Matplotlib chart with FastAPI/ Nextjs without saving chart locally?

How to display a Matplotlib chart with FastAPI/ Nextjs without saving chart locally? Question: I am using Nextjs frontend and FastAPI backend for a website. I have an input form for an ‘ethereum address’ on the frontend and using the inputted address, I am generating a matplotlib chart in the backend that displays ‘ethereum balance …

Total answers: 2

Python Serverless Function Vercel – Next.js

Python Serverless Function Vercel – Next.js Question: I found out that I could use Python to create a serverless function inside a Next.js project. Once deployed to Vercel, it will get converted into a serverless function. I went through the docs and found a simple example that outputs the date: from http.server import BaseHTTPRequestHandler from …

Total answers: 1