Skip to content

TomOrth/pyServer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

pyServer

Basic web server in python #Basic Library Outputs the response that you want on the screen in plain text
Example:

from server import Server
s = Server("Hello, world")
s.listen("0.0.0.0", 3000)

#Intermediate Library Outputs either the plaintext response that you want or the html file that you want displayed

Plain Text:

from server import Server
s = Server("text/plain")
s.listen("0.0.0.0", 3000, "Hello, World")

Html text

from server import Server
s = Server("text/html")
s.listen("0.0.0.0", 3000, "hello.html")

hello.html

<!DOCTYPE html>
<html>
  <body>
    <p><b>Hello World</b></p>
  </body>
</html>

Examples can be found in basicLibrary and intermediateLibrary folder

About

Basic web server in python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published