Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mutalyzer
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mirrors
mutalyzer
Commits
fbe5678d
Commit
fbe5678d
authored
11 years ago
by
Vermaat
Browse files
Options
Downloads
Patches
Plain Diff
Find website static files if running debugserver
parent
53e65c00
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
mutalyzer/entrypoints/website.py
+11
-8
11 additions, 8 deletions
mutalyzer/entrypoints/website.py
with
11 additions
and
8 deletions
mutalyzer/entrypoints/website.py
+
11
−
8
View file @
fbe5678d
...
...
@@ -10,14 +10,6 @@ Example Apache/mod_wsgi configuration:
Alias /static /var/www/mutalyzer/static
WSGIScriptAlias / /usr/local/bin/mutalyzer-website
You can also use the built-in HTTP server by running this file directly.
Note, however, that static files are only found by this server in a
'
static
'
subdirectory of the current working directory. If you
'
re running Mutalyzer
from its source code directory, you can satisfy this by creating a quick
symbolic link:
ln -s mutalyzer/templates/static
Another common practice is to use Nginx to directly serve the static files
and act as a reverse proxy server to the Mutalyzer HTTP server.
...
...
@@ -36,10 +28,16 @@ Example Nginx configuration:
proxy_pass http://127.0.0.1:8080;
}
}
You can also use the built-in HTTP server by running this file directly. This
will give you a single-threaded server suitable for development which will
also serve the static files.
"""
import
argparse
import
os
import
pkg_resources
from
..
import
website
...
...
@@ -51,6 +49,11 @@ def debugserver():
"""
Run the website with the Python built-in HTTP server.
"""
# There's really no sane way to make web.py serve static files other than
# providing it with a `static` directory, so we just jump to the template
# directory where it can find this.
os
.
chdir
(
pkg_resources
.
resource_filename
(
'
mutalyzer
'
,
'
templates
'
))
website
.
app
.
run
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment