You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+14-8Lines changed: 14 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,10 +41,10 @@ Some characteristics of this API:
41
41
# Example applications
42
42
There are a few proof of concept example applications for usage of the API at https://litcal.johnromanodorazio.com/usage.php, which demonstrate generating an HTML representation of the Liturgical Calendar.
43
43
44
-
* The [first example](https://litcal.johnromanodorazio.com/examples/php/) uses cURL in PHP to make a request to the endpoint and handle the results.
45
-
* The [second example](https://litcal.johnromanodorazio.com/examples/javascript/) uses `fetch` in Javascript to make the request to the endpoint and handle the results.
46
-
* The [third example](https://litcal.johnromanodorazio.com/examples/fullcalendar/examples/month-view.html) makes use of the [FullCalendar javascript framework](https://github.com/fullcalendar/fullcalendar) to display the results from the `fetch` request in a nicely formatted calendar view.
47
-
* The [fourth example](https://litcal.johnromanodorazio.com/examples/fullcalendar/examples/messages.html) is the same as the third except that it outputs the Messages first and the [FullCalendar](https://github.com/fullcalendar/fullcalendar) calendar view after.
44
+
* The [first example](https://litcal.johnromanodorazio.com/examples.php?example=PHP) uses cURL in PHP to make a request to the endpoint and handle the results.
45
+
* The [second example](https://litcal.johnromanodorazio.com/examples.php?example=JavaScript) uses `fetch` in Javascript to make the request to the endpoint and handle the results.
46
+
* The [third example](https://litcal.johnromanodorazio.com/examples.php?example=FullCalendar) makes use of the [FullCalendar javascript framework](https://github.com/fullcalendar/fullcalendar) to display the results from the `fetch` request in a nicely formatted calendar view.
47
+
* The [fourth example](https://litcal.johnromanodorazio.com/examples.php?example=FullCalendarMessages) is the same as the third except that it outputs the Messages first and the [FullCalendar](https://github.com/fullcalendar/fullcalendar) calendar view after.
48
48
49
49
All of these examples request `JSON` as the data exchange format generated by the endpoint. Any application could use the endpoint in a similar manner: an Android App, a plugin for a Desktop Publishing App...
* System language packs for all the supported languages
66
66
67
67
## Using PHP's builtin server
68
68
69
-
To test the API locally, you can use PHP's builtin server. However, you will need to spawn at least a couple of workers, since some routes will make a request internally to another route. For example, a request to the `/calendar` route will make a request internally to the `/calendars` route.
69
+
To test the API locally, you can use PHP's builtin server. However, you will need to spawn at least a couple of workers, since some routes will make a request internally to another route. For example, a request to the `/calendar` route will make a request internally to the `/calendars` route. To be really safe, you could spawn up to 6 workers.
70
70
71
71
Spawn at least two workers:
72
72
```bash
73
73
PHP_CLI_SERVER_WORKERS=2 php -S localhost:8000
74
74
```
75
75
76
-
## Using a docker container
77
-
78
76
For convenience when using VSCode, a `tasks.json` has been defined so that you can simply type <kbd>CTRL</kbd>+<kbd>SHIFT</kbd>+<kbd>B</kbd> (<kbd>CMD</kbd>+<kbd>SHIFT</kbd>+<kbd>B</kbd> on MacOS) to start the PHP builtin server and open the browser.
79
77
78
+
## Using a docker container
79
+
80
80
To further simplify your setup, without having to worry about getting all the system requirements in place, you can also launch the API in a docker container using the repo `Dockerfile`:
0 commit comments