{"id":13409213,"url":"https://github.com/simonjwright/ews","last_synced_at":"2025-03-14T14:31:03.079Z","repository":{"id":45734988,"uuid":"469184860","full_name":"simonjwright/ews","owner":"simonjwright","description":"The Embedded Web Server is designed for use in embedded systems with limited resources (eg, no disk). It supports both static (converted from a standard web tree, including graphics and Java class files) and dynamic pages. It is written in GCC Ada.","archived":false,"fork":false,"pushed_at":"2022-08-19T13:46:51.000Z","size":913,"stargazers_count":15,"open_issues_count":3,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-10T16:55:22.604Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ada","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simonjwright.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING.RUNTIME","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-03-12T19:48:56.000Z","updated_at":"2025-02-13T21:32:25.000Z","dependencies_parsed_at":"2022-08-12T12:10:19.091Z","dependency_job_id":null,"html_url":"https://github.com/simonjwright/ews","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonjwright%2Fews","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonjwright%2Fews/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonjwright%2Fews/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonjwright%2Fews/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simonjwright","download_url":"https://codeload.github.com/simonjwright/ews/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243593307,"owners_count":20316164,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-30T20:00:58.898Z","updated_at":"2025-03-14T14:31:02.652Z","avatar_url":"https://github.com/simonjwright.png","language":"Ada","funding_links":[],"categories":["Frameworks"],"sub_categories":["Web"],"readme":"# Embedded Web Server #\n\n## Introduction ##\n\nEWS is a web server construction kit, designed for embedded applications using the GNAT Ada compiler.\n\nThe project is hosted on [Github](https://github.com/simonjwright/ews).\n\n## Building with Alire ##\n\nSee the [Alire documentation](https://alire.ada.dev/docs/#introduction).\n\nAfter you've installed Alire, start a small test program by saying\n```\nalr init --bin ews_test\ncd ews_test\nalr with ews\n```\n\nThis generates a project (GPR) file at the top level and a source file `src/ews_test.adb`.\n\nCreate a directory `html` and in it `index.html` containing (for example)\n```\n\u003chtml\u003e\n\u003cbody\u003e\n\u003cfont color=\"red\"\u003eHello world!\u003c/font\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n```\n\nThe contents of `html/` need to be converted to Ada source code in `src/`, which will form the static content of the pages served by `ews_test`. This can be done as part of the Alire build process; to do this, edit `alire.toml` to add the lines\n```\n[[actions]]\ntype = \"pre-build\"\ncommand = [\"ews_generator\", \"--input-dir\", \"html\", \"--output-dir\", \"src\"]\n```\n\nEdit the contents of `src/ews_test.adb` to contain\n```\nwith EWS_Htdocs;\nwith EWS.Server;\nprocedure EWS_Test is\nbegin\n   EWS.Server.Serve (Using_Port =\u003e 8088,\n                     Tracing    =\u003e True);\nend EWS_Test;\n```\n\nand build and run with\n```\nalr run\n```\n\nNow, in your browser, open `localhost:8088` (possibly, `127.0.0.1:8088`) to see your exciting web page!\n\nTo see a worked example of dynamic content, check out the document [ews.pdf](https://github.com/simonjwright/ews/blob/master/demonstrator/ews.pdf).\n\n## Building outside Alire ##\n\nEWS requires GNAT and XML/Ada, and uses Ada 2012 features.\n\nIn the top-level directory, `make` will build the library, and `make demo` will create a server `doc/ews_demo`, which when executed will listen on port 8080 and respond with the web in the `doc/` directory.\n\nThe package can be installed with the compiler by `make install` (more likely, `sudo make install`). You can install in an alternative place by setting `prefix`, for example\n\n    $ make install prefix=~/local/ews\n\n## Dynamic web ##\n\nThe facilities available in EWS, and the code for a demonstration, are described in `demonstrator/ews.pdf`, which is derived from `demonstrator/ews.w`. As well as being the document source, `ews.w` also acts as the source code using the [Literate Programming](http://www.literateprogramming.com/) facilities of [nuweb.py](https://github.com/simonjwright/nuweb.py).\n\n### Demonstration ###\n\nIf you're seeing this page via the demonstration (`ews_demo`), you can view a page with [AJAX](https://en.wikipedia.org/wiki/Ajax_\\(programming\\)) content [here](ajax.html).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonjwright%2Fews","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimonjwright%2Fews","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonjwright%2Fews/lists"}