A sample custom module for setting site api key in drupal 8.
#Steps to Use this module :-
- install the module in drupal and enable it.
- Login as admin in backend of drupal and go to configuration->site settings
- Enter the site api key for your site in the text field provided in the above form.
- Try to access any page on frontend (site) with proper api key and page id. Ex :- /page_json/<api_key>/ You will see the title and body of the page if proper inputs are given. Else you will get the error message accordingly.
#Resources Used :-
- https://www.drupal.org/forum/support/post-installation/2019-02-06/add-a-new-custom-field-to-site-infomation-form-in-drupal8
- https://www.drupal.org/docs/8/creating-custom-modules/add-a-routing-file
- https://redcrackle.com/blog/say-hello-world-drupal-8-basic-steps-involved-creating-custom-module-drupal-8
#Time taken :- Since Drupal was new for me. So it took around 5-6 hours after the setup.