mirror of
https://github.com/ArchiveBox/ArchiveBox
synced 2024-11-23 04:33:11 +00:00
19 lines
No EOL
468 B
Python
19 lines
No EOL
468 B
Python
from os.path import abspath
|
|
from os import getcwd
|
|
from pathlib import Path
|
|
|
|
from bottle import route, run, static_file
|
|
|
|
@route("/")
|
|
def index():
|
|
return "Hello"
|
|
|
|
@route("/static/<filename>")
|
|
def static_path(filename):
|
|
template_path = abspath(getcwd()) / Path("tests/mock_server/templates")
|
|
response = static_file(filename, root=template_path)
|
|
response.set_header("Content-Type", "")
|
|
return response
|
|
|
|
def start():
|
|
run(host='localhost', port=8080) |