initial commit
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Getting Started - pyserve</title>
|
||||
<link rel="stylesheet" href="../style.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="container">
|
||||
<div id="header">
|
||||
<h1>pyserve</h1>
|
||||
<div class="tagline">python application orchestrator</div>
|
||||
</div>
|
||||
|
||||
<div class="breadcrumb">
|
||||
<a href="../index.html">pyserve</a> » Getting Started
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<h2>Getting Started</h2>
|
||||
|
||||
<p>Get up and running with pyserve quickly.</p>
|
||||
|
||||
<table class="dirindex">
|
||||
<tr>
|
||||
<td class="icon"><span class="file">📄</span></td>
|
||||
<td><a href="installation.html">Installation</a></td>
|
||||
<td class="desc">Download and install pyserve</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="icon"><span class="file">📄</span></td>
|
||||
<td><a href="quickstart.html">Quick Start</a></td>
|
||||
<td class="desc">Get up and running in 5 minutes</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
<p>pyserve © 2024-2025 | MIT License</p>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,79 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Installation - pyserve</title>
|
||||
<link rel="stylesheet" href="../style.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="container">
|
||||
<div id="header">
|
||||
<h1>pyserve</h1>
|
||||
<div class="tagline">python application orchestrator</div>
|
||||
</div>
|
||||
|
||||
<div class="breadcrumb">
|
||||
<a href="../index.html">pyserve</a> » <a href="/getting-started/">Getting Started</a> » Installation
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<h2>Installation</h2>
|
||||
|
||||
<h3>Requirements</h3>
|
||||
<ul class="indent">
|
||||
<li>Python 3.12 or higher</li>
|
||||
<li>pip (Python package manager)</li>
|
||||
</ul>
|
||||
|
||||
<h3>Install from Release (Recommended)</h3>
|
||||
<p>Download the latest wheel file from <a href="https://github.com/ShiftyX1/PyServe/releases">GitHub Releases</a> and install it:</p>
|
||||
|
||||
<pre><span class="comment"># Download the wheel file from releases</span>
|
||||
<span class="comment"># Example: pyserve-0.7.0-py3-none-any.whl</span>
|
||||
|
||||
pip install pyserve-0.7.0-py3-none-any.whl</pre>
|
||||
|
||||
<p>After installation, the <code>pyserve</code> command will be available in your terminal:</p>
|
||||
<pre>pyserve --version</pre>
|
||||
|
||||
<h3>Install from Source</h3>
|
||||
<p>For development or if you want the latest changes:</p>
|
||||
|
||||
<pre><span class="comment"># Clone the repository</span>
|
||||
git clone https://github.com/ShiftyX1/PyServe.git
|
||||
cd PyServe
|
||||
|
||||
<span class="comment"># Install with Poetry (recommended for development)</span>
|
||||
make init
|
||||
|
||||
<span class="comment"># Or build and install the package</span>
|
||||
make build
|
||||
pip install dist/pyserve-*.whl</pre>
|
||||
|
||||
<h3>Verify Installation</h3>
|
||||
<p>Check that pyserve is installed correctly:</p>
|
||||
<pre>pyserve --version
|
||||
<span class="comment"># Output: pyserve 0.7.0</span></pre>
|
||||
|
||||
<h3>Dependencies</h3>
|
||||
<p>pyserve automatically installs the following dependencies:</p>
|
||||
<ul class="indent">
|
||||
<li><code>starlette</code> — ASGI framework</li>
|
||||
<li><code>uvicorn</code> — ASGI server</li>
|
||||
<li><code>pyyaml</code> — YAML configuration parsing</li>
|
||||
<li><code>structlog</code> — Structured logging</li>
|
||||
<li><code>httpx</code> — HTTP client for reverse proxy</li>
|
||||
</ul>
|
||||
|
||||
<div class="note">
|
||||
<strong>Next:</strong> Continue to <a href="quickstart.html">Quick Start</a> to run your first server.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
<p>pyserve © 2024-2025 | MIT License</p>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,121 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Quick Start - pyserve</title>
|
||||
<link rel="stylesheet" href="../style.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="container">
|
||||
<div id="header">
|
||||
<h1>pyserve</h1>
|
||||
<div class="tagline">python application orchestrator</div>
|
||||
</div>
|
||||
|
||||
<div class="breadcrumb">
|
||||
<a href="../index.html">pyserve</a> » <a href="/getting-started/">Getting Started</a> » Quick Start
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<h2>Quick Start</h2>
|
||||
|
||||
<p>Get pyserve running in under 5 minutes.</p>
|
||||
|
||||
<h3>1. Create Configuration File</h3>
|
||||
<p>Create a file named <code>config.yaml</code> in your project directory:</p>
|
||||
|
||||
<pre><span class="directive">http:</span>
|
||||
<span class="directive">static_dir:</span> <span class="value">./static</span>
|
||||
<span class="directive">templates_dir:</span> <span class="value">./templates</span>
|
||||
|
||||
<span class="directive">server:</span>
|
||||
<span class="directive">host:</span> <span class="value">0.0.0.0</span>
|
||||
<span class="directive">port:</span> <span class="value">8080</span>
|
||||
|
||||
<span class="directive">logging:</span>
|
||||
<span class="directive">level:</span> <span class="value">INFO</span>
|
||||
<span class="directive">console_output:</span> <span class="value">true</span>
|
||||
|
||||
<span class="directive">extensions:</span>
|
||||
- <span class="directive">type:</span> <span class="value">routing</span>
|
||||
<span class="directive">config:</span>
|
||||
<span class="directive">regex_locations:</span>
|
||||
<span class="value">"__default__"</span>:
|
||||
<span class="directive">root:</span> <span class="value">"./static"</span>
|
||||
<span class="directive">index_file:</span> <span class="value">"index.html"</span></pre>
|
||||
|
||||
<h3>2. Create Static Directory</h3>
|
||||
<p>Create a <code>static</code> folder and add an <code>index.html</code>:</p>
|
||||
|
||||
<pre>mkdir -p static
|
||||
echo '<h1>Hello from pyserve!</h1>' > static/index.html</pre>
|
||||
|
||||
<h3>3. Start the Server</h3>
|
||||
<pre>pyserve</pre>
|
||||
|
||||
<p>You should see output like:</p>
|
||||
<pre>Starting PyServe server on 0.0.0.0:8080</pre>
|
||||
|
||||
<h3>4. Open in Browser</h3>
|
||||
<p>Navigate to <a href="http://localhost:8080">http://localhost:8080</a> — you should see your page!</p>
|
||||
|
||||
<h3>Using CLI Options</h3>
|
||||
<p>Override configuration via command line:</p>
|
||||
|
||||
<pre><span class="comment"># Use a different config file</span>
|
||||
pyserve -c /path/to/config.yaml
|
||||
|
||||
<span class="comment"># Override host and port</span>
|
||||
pyserve --host 127.0.0.1 --port 9000
|
||||
|
||||
<span class="comment"># Enable debug mode (verbose logging)</span>
|
||||
pyserve --debug</pre>
|
||||
|
||||
<h3>Example: Serve Documentation</h3>
|
||||
<p>Serve a documentation directory with proper caching:</p>
|
||||
|
||||
<pre><span class="directive">http:</span>
|
||||
<span class="directive">static_dir:</span> <span class="value">./docs</span>
|
||||
|
||||
<span class="directive">server:</span>
|
||||
<span class="directive">host:</span> <span class="value">0.0.0.0</span>
|
||||
<span class="directive">port:</span> <span class="value">8000</span>
|
||||
|
||||
<span class="directive">extensions:</span>
|
||||
- <span class="directive">type:</span> <span class="value">routing</span>
|
||||
<span class="directive">config:</span>
|
||||
<span class="directive">regex_locations:</span>
|
||||
<span class="value">"=/"</span>:
|
||||
<span class="directive">root:</span> <span class="value">"./docs"</span>
|
||||
<span class="directive">index_file:</span> <span class="value">"index.html"</span>
|
||||
|
||||
<span class="value">"~*\\.(css|js)$"</span>:
|
||||
<span class="directive">root:</span> <span class="value">"./docs"</span>
|
||||
<span class="directive">cache_control:</span> <span class="value">"public, max-age=3600"</span>
|
||||
|
||||
<span class="value">"~*\\.html$"</span>:
|
||||
<span class="directive">root:</span> <span class="value">"./docs"</span>
|
||||
<span class="directive">cache_control:</span> <span class="value">"no-cache"</span>
|
||||
|
||||
<span class="value">"__default__"</span>:
|
||||
<span class="directive">root:</span> <span class="value">"./docs"</span>
|
||||
<span class="directive">index_file:</span> <span class="value">"index.html"</span></pre>
|
||||
|
||||
<div class="note">
|
||||
<strong>Next Steps:</strong>
|
||||
<ul class="indent">
|
||||
<li><a href="../guides/process-orchestration.html">Process Orchestration</a> — Run apps in isolated processes</li>
|
||||
<li><a href="../guides/configuration.html">Configuration Guide</a> — Full configuration reference</li>
|
||||
<li><a href="../guides/routing.html">Routing Guide</a> — nginx-style URL patterns</li>
|
||||
<li><a href="../guides/reverse-proxy.html">Reverse Proxy</a> — Proxy to backend services</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
<p>pyserve © 2024-2025 | MIT License</p>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user