Check-in [3bb6b9ecdb]

Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Added an index page to the server, so you can browse http://localhost:4001 and get nice links to the examples.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:3bb6b9ecdb0269369292d2181829a61810ebfcc9
User & Date: andy 2015-05-01 09:12:37
Context
2015-05-07
09:54
Updated presentation: final version. Leaf check-in: a01b5086af user: andy tags: trunk
2015-05-01
09:12
Added an index page to the server, so you can browse http://localhost:4001 and get nice links to the examples. check-in: 3bb6b9ecdb user: andy tags: trunk
2015-04-30
07:06
Updated flyer with presentation location. check-in: 855f5cd0f0 user: andy tags: trunk
Changes
Hide Diffs Unified Diffs Show Whitespace Changes Patch

Added examples/index.html.













































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>Arend &mdash; Samples</title>
    <style type="text/css">
      body {
        font-family: sans-serif;
        width: 600px;
        margin-left: auto;
        margin-right: auto;
      }
    </style>
  </head>
  <body>
    <h1>Arend samples</h1>

    <p><a href="examples/repl.html">Run-Eval-Print loop</a></p>

    <p><a href="examples/proof-mockup.html">Proof assistant demo</a></p>
  </body>
</html>

Changes to server.pl.

51
52
53
54
55
56
57
58

59
60
61
62
63
64
65

:- http_handler(root(src), serve_files_in_directory(src), [prefix]).
:- http_handler(root(res), serve_files_in_directory(res), [prefix]).
:- http_handler(root(lib), serve_files_in_directory(lib), [prefix]).
:- http_handler(root(examples), serve_files_in_directory(examples), [prefix]).

% Simple index handler, so that I don't have to stare at a 404 on startup.
%:- http_handler('/index.html', show_index, []).



% server(), server(Port)
% Start the Arend server on the specified port (defaults to 4001).
start :- server(4001).
server(Port) :-
      http_server(http_dispatch, [port(Port)]).







|
>







51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66

:- http_handler(root(src), serve_files_in_directory(src), [prefix]).
:- http_handler(root(res), serve_files_in_directory(res), [prefix]).
:- http_handler(root(lib), serve_files_in_directory(lib), [prefix]).
:- http_handler(root(examples), serve_files_in_directory(examples), [prefix]).

% Simple index handler, so that I don't have to stare at a 404 on startup.
:- http_handler(root('.'), http_reply_file(examples('index.html'),[]), []).
:- http_handler(root('index.html'), http_reply_file(examples('index.html'),[]), []).


% server(), server(Port)
% Start the Arend server on the specified port (defaults to 4001).
start :- server(4001).
server(Port) :-
      http_server(http_dispatch, [port(Port)]).