Using JavaScript Api to build a simple Drupal 8 module

Introduction

JavaScript

The coding process

My module’s folder
'MODULENAME'.info.yml
fruit.info.yml
fruit.libraries.yml
fruit.routing.yml
fruit/src/Controller/<ControllerName.php>
My FruitController.php
My Javascript codes

Installing the module

Uploading module fruit
Module enabled
The js module