Started the Python script and a example html file

master
Matheus 6 years ago
parent ddd67c1dfc
commit 2e0b03f182

@ -0,0 +1,9 @@
import http.server
import socketserver
PORT = 8080 # Define the standard port
Handler = http.server.SimpleHTTPRequestHandler # Simple http request handler, it commits all files and directories within the SelfHost.py folder
with socketserver.TCPServer(("", PORT), Handler) as httpd: # ("ip address", desired port), call the resquests from files
print("Running @ ", PORT) # Simply outputs on terminal the port that the server is operating
httpd.serve_forever() # Method that simply begins listening and responding to incoming requests

@ -0,0 +1,74 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Pandora</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://bootswatch.com/4/solar/bootstrap.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://bootswatch.com/_assets/css/custom.min.css"></script>
<style>
/* Set height of the grid so .sidenav can be 100% (adjust if needed) */
.row.content {height: 1500px}
/* Set gray background color and 100% height */
.sidenav {
background-color: #f1f1f1;
height: 100%;
}
/* Set black background color, white text and some padding */
footer {
background-color: #555;
color: white;
padding: 15px;
}
/* On small screens, set height to 'auto' for sidenav and grid */
@media screen and (max-width: 767px) {
.sidenav {
height: auto;
padding: 15px;
}
.row.content {height: auto;}
}
</style>
</head>
<body>
<div class="container-fluid">
<div class="row content">
<div class="col-sm-3 sidenav">
<h4>Pandora WebServer</h4>
<ul class="nav nav-pills nav-stacked">
<li class="active"><a href="#section1">GitHub</a></li>
</ul><br>
<div class="input-group">
<input type="text" class="form-control" placeholder="Search Blog..">
<span class="input-group-btn">
<button class="btn btn-default" type="button">
<span class="glyphicon glyphicon-search"></span>
</button>
</span>
</div>
</div>
<div class="col-sm-9">
<h2>What the fuck is pandora?</h2>
<h5><span class="glyphicon glyphicon-time"></span>Spoiler: its a selfhost thing</h5>
<p>Pandora is a self hosting web server wich can be used to test and fastly deploy web pages and apps. It is made in Python 3 and is very lightweight.
</br>
<br>It uses basic python library and executes and listens on a specific port wich can be changed and it even handles a IP if one wishes to deploy and test in a real world situation.
</br>
</p>
<br><br>
<h4><small>RECENT POSTS</small></h4>
<hr>
<h2>Officially Blogging</h2>
<h5><span class="glyphicon glyphicon-time"></span> Post by John Doe, Sep 24, 2015.</h5>
<h5><span class="label label-success">Lorem</span></h5><br>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
<hr>
</body>
</html>
Loading…
Cancel
Save