-
Notifications
You must be signed in to change notification settings - Fork 0
/
handler.bas
19 lines (19 loc) · 902 Bytes
/
handler.bas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
1 REM This is an example Lambda handler in C64 Basic that can be used as an ALB target
10 PRINT "{"
20 PRINT " ";CHR$(34);"statusCode";CHR$(34);": 200,"
30 PRINT " ";CHR$(34);"statusDescription";CHR$(34);": ";CHR$(34);"200 OK";CHR$(34);","
40 PRINT " ";CHR$(34);"isBase64Encoded";CHR$(34);": false,"
50 PRINT " ";CHR$(34);"headers";CHR$(34);": {"
60 PRINT " ";
70 PRINT CHR$(34);"Content-Type";CHR$(34);": ";CHR$(34);"text";CHR$(47);"html";
80 PRINT CHR$(59);" charset=utf-8";CHR$(34)
90 PRINT " },"
100 PRINT " ";CHR$(34);"body";CHR$(34);": ";
105 REM The actual HTML goes here
110 PRINT CHR$(34);"<html><head><title>Hello World!</title>";
120 PRINT "<style>html, body {margin: 0; padding: 0;text-align: center;}</style>";
130 PRINT "</head><body><br><pre>";
140 PRINT "--==** This page is built with Commodore 64 BASIC V2 **==--</pre>";
150 PRINT "</body></html>";CHR$(34)
160 PRINT "}"
RUN