ICPP Web Suite 1.1.0 — Windows x64
==================================

A web server, an interpreter, and three worked sites. Install it and you have
a working web stack in one directory: no runtime to install, no Python, no
JVM, no database server.

Copyright (c) 2026 Muhammad Anisur Rahman. MIT licence — see LICENSE.


INSTALL
-------

Double-click setup.bat. Or, from a terminal:

    powershell -ExecutionPolicy Bypass -File setup.ps1

It copies the package to %LOCALAPPDATA%\ICPP-Web-Suite, puts the bin
directory on your PATH, writes the server's configuration with real paths in
it, and then runs kcpp to prove the install works. It needs no administrator
and changes nothing outside your own account.

    setup.ps1 -To "D:\tools\icpp"    install somewhere else
    setup.ps1 -NoPath                do not touch PATH
    setup.ps1 -Uninstall             remove it again

Uninstalling never deletes your sites directory. It tells you where it is
and leaves it for you.


FIRST RUN
---------

    iweb

Then open http://localhost:8098/ . You should see the index of three
examples. Stop the server with Ctrl-C.

`iweb` is a small launcher that starts the server from the install directory,
because iwebserver reads its configuration from the current directory.


WHAT IS IN IT
-------------

    bin/        the programs, and what goes on your PATH
      kcpp.exe        the compiler and the ICPP interpreter
      icpp.exe        the interpreter's own front end
      icpptpl.exe     renders .icpp.html pages
      iwebserver.exe  the web server
      kpython.dll     Python inside ICPP           } no runtime
      kjava.dll       Java inside ICPP             } to install
      kjson.dll       JSON as a symbol table       }
      isqldll.dll     the InternetSQL engine
      klink, klib, khex16, kice, kzip   toolchain utilities
      mod_status.dll  a worked example of a server module
      iweb.bat        written by setup: starts the server from anywhere

    sites/      the three example sites - yours to edit
    conf/       the server configuration setup wrote
    doc/        the manuals
    examples/   ICPP programs you can run directly with icpp.exe


THE THREE SITES
---------------

  1. sites/01-hello        The page IS the program. Printing, loops, your own
                           functions, the string builtins.
  2. sites/02-languages    Python, Java and JSON in one ordinary .html file,
                           sharing their values, with none of the three
                           installed on the machine.
  3. sites/03-forms        Reading what a visitor typed - and the one call
                           that stands between you and a cross-site
                           scripting hole.

Edit any of them, save, reload. There is no build step and nothing to
restart. A page that will not compile says so in the browser, with the line
number.


RUNNING THE LANGUAGE EXAMPLES
-----------------------------

    icpp examples\01_core_language.icpp

Each one checks itself and prints how many checks passed.


THREE THINGS WORTH KNOWING BEFORE YOU WRITE A PAGE
--------------------------------------------------

1. A <?icpp ?> block is a BODY, not a program. Do not write main() - the
   renderer wraps every block on the page into one main() for you.

2. So a function cannot be written inside a block. Put it in a .c file and
   splice it in with #include, as sites/01-hello does with tempconv.c.

3. Create every variable at the top, before any if or while. A $var whose
   first assignment is inside a branch leaves the interpreter with nothing to
   print.

And one rule about safety: anything that came from a visitor goes through
icpp_html_escape() before it is printed. iprint writes its arguments into the
page exactly as given, so a query parameter printed raw is a cross-site
scripting hole. sites/03-forms shows it.


WHAT THIS IS NOT
----------------

There is no HTTPS. Put nginx, Apache or Cloudflare in front and forward to
this on localhost. There is no rate limiting. Page scripts cannot yet see the
request. doc\IWEBSERVER_USER_MANUAL.md section 8 is the full list, stated
plainly rather than left to be discovered.


THE MANUALS
-----------

    doc\ICPP_USER_MANUAL.md        the language and every builtin
    doc\ICPP_LANGUAGES_GUIDE.md    Python, Java and JSON inside ICPP
    doc\IWEBSERVER_USER_MANUAL.md  the server, configuration to caveats
    doc\ICPP_MANUAL.md             the developer's reference


Built 2026-09-23. kcpp 1.0.0+4d71c57, iwebserver 0.3.
