diff options
-rw-r--r-- | .gitignore | 3 | ||||
-rw-r--r-- | Makefile | 6 | ||||
-rwxr-xr-x | bin/build.psgi | 21 | ||||
-rwxr-xr-x | bin/src.psgi | 20 | ||||
-rw-r--r-- | src/index.html | 19 |
5 files changed, 68 insertions, 1 deletions
@@ -1,4 +1,5 @@ -build/* +build-* fetch-* +build/* src/data/*.json vendor/* @@ -10,6 +10,12 @@ build-compact: $(DATAFILES) \ nodejs /usr/lib/nodejs/requirejs/r.js -o etc/build.js touch $@ +# load httpd service +serve-quick: + bin/src.psgi +serve-compact: build-compact + bin/build.psgi + newfiles-vendor-kk = vendor/kk/*.json fetch-vendor-kk: bin/get-kk.sh diff --git a/bin/build.psgi b/bin/build.psgi new file mode 100755 index 0000000..cdc51ef --- /dev/null +++ b/bin/build.psgi @@ -0,0 +1,21 @@ +#!/usr/bin/env plackup + +use strict; +use warnings; + +use FindBin qw($Bin); + +use Plack::Builder; + +#use Plack::App::File; +use Plack::App::Directory; + +builder { + eval { enable 'DirIndex' }; + eval { enable 'Deflater' }; + +# enable 'Debug', panels => [ qw(DBITrace Memory Timer) ]; +# mount '/usr/share/javascript' => Plack::App::File->new( root => '/usr/share/javascript' )->to_app; + mount '/' => + Plack::App::Directory->new( root => "$Bin/../build" )->to_app; +}; diff --git a/bin/src.psgi b/bin/src.psgi new file mode 100755 index 0000000..44e557a --- /dev/null +++ b/bin/src.psgi @@ -0,0 +1,20 @@ +#!/usr/bin/env plackup + +use strict; +use warnings; + +use FindBin qw($Bin); + +use Plack::Builder; + +#use Plack::App::File; +use Plack::App::Directory; + +builder { + eval { enable 'DirIndex' }; + eval { enable 'Deflater' }; + +# enable 'Debug', panels => [ qw(DBITrace Memory Timer) ]; +# mount '/usr/share/javascript' => Plack::App::File->new( root => '/usr/share/javascript' )->to_app; + mount '/' => Plack::App::Directory->new( root => "$Bin/../src" )->to_app; +}; diff --git a/src/index.html b/src/index.html new file mode 100644 index 0000000..dec1be4 --- /dev/null +++ b/src/index.html @@ -0,0 +1,19 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> +<title>Unfallanalyse</title> +<meta name="viewport" content="width=device-width" /> +<link href="favicon.ico" rel="icon" type="image/x-icon" /> +<link href="css/leaflet/leaflet.css" rel="stylesheet" type="text/css" /> +<link href="css/leaflet/MarkerCluster.css" rel="stylesheet" type="text/css" /> +<link href="css/leaflet/MarkerCluster.Default.css" rel="stylesheet" type="text/css" /> +<link href="css/font-awesome.css" rel="stylesheet" type="text/css" /> +<link href="css/leaflet/extra-markers.css" rel="stylesheet" type="text/css" /> +<link href="css/map.css" rel="stylesheet" type="text/css" /> +</head> +<body> +<div id="content"></div> +<script src="js/lib/require.js" data-main="js/tours" type="text/javascript"></script> +</body> +</html> |