0

As the question suggests I'm trying to find a way using JavaScript to send some data to a local python server. I know that using javascript. I know that browser JS can't import any libraries via "Require". Does anyone know of a method using JS on its own?

1
  • Have you done any research? Commented Jan 23, 2020 at 0:39

1 Answer 1

4

Yes.

Make your Python app listen for HTTP requests, and then use the Fetch API from JavaScript.

Sign up to request clarification or add additional context in comments.

1 Comment

This should work. Flask would be the best bet for a quick and easy local server

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.