Hi everyone, this is my first post, so i want to say hi first.
Forgive me my English, i'm not native speaker.
Few weeks ago, i started using drupal, after using wordpress for some time,
In wordpress i have many useful functions in my functions.php that i miss
in drupal, but time has come, when people/friends/clients ask:
- Do you build websites based on drupal...?
Creating and editing php loops, its not problem for me,
but in drupal, what shame of me, i've got lost easly, so many things
I created a JavaScript file which allows a user to run a mortgage calculator. It works fine stand alone in Textastic. Following the Drupal 8 documentation:
Added it to my custom theme under the js folder.
Created a new library in the info file called calculator
Added the js file reference under the calculator library
Created a basic page called mortgage calculator
Added a custom template for the calculator
Attached the calculator library in the custom twig template
There is clear documentation about how to authenticate using REST, however this seems to be only for the use case of client-side rendering and api request (like angular). I can't seem to figure out how to handle this when using node.js as a frontend, where node.js interacts with drupal (using a websocket). Should I use sessions to set drupal cookies per user?