I am trying to build a Pomodoro timer, using expressjs. I've made the pages with EJS, and gave name attributes to each to tap into them in the server. However I am quite confused if I should wrap each button in a form, and make separate post routes for each of their functionalities in my app.js file to "capture" the click?
I think this would be much easier to make just using plain JavaScript, but I'm trying to make this a full stack kind of application to show that I am familiar with node and express.
I will share the page rendered and the EJS code for it. App.js is pretty much empty right now except some boilerplate/regular routings to other pages. I think I have a good idea on how to implement the timer in javascript, I'm just not sure how to implement that in node/express. I hope my question is clear, I've just started using Stackoverflow so bear with me please :) Pomodoro timer page
<!-- Timers -->
<div class="row p-1">
<p class="col-lg-4 pomodoro-timer" name="w_minutes">25<span class="colon">:</span><span name="w_seconds"></span>00</p>
<p class="col-lg-4 pomodoro-timer pomodoro-cycles" name="cycles">0</p>
<p class="col-lg-4 pomodoro-timer" name="b_minutes">5<span class="colon">:</span><span name="b_seconds"></span>00</p>
</div>
<!-- Timer buttons -->
<div class="row mt-2">
<div class="col-lg-4 pomodoro-button">
<button class="btn btn-lg btn-light" type="button" name="startButton">Start</button>
</div>
<div class="col-lg-4 pomodoro-button">
<button class="btn btn-lg btn-danger" type="button" name="resetButton">Reset</button>
</div>
<div class="col-lg-4 pomodoro-button">
<button class="btn btn-lg btn-warning" type="button" name="pauseButton">Pause</button>
</div>
</div>