A simple web application built with Node.js and Express. This application is basically just me testing the use of HTMX for partially updating the page to display the current time in two formats: 12-hour and 24-hour.
- Clone the Repository
git clone https://github.com/SRCthird/htmx-time.git cd htmx-time
- Install Dependencies
Using npm:
Or using Yarn:
npm install
yarn install
- Start the Application
Using npm:
Or using Yarn:
npm start
Navigate to http://localhost:3000 to access the application.yarn start
Once the application is running, you will see a button on the page that allows you to "Check the Time." When clicked, this will display the current time and allow you to switch between 12-hour and 24-hour formats by clicking another button. The time will update every second without the need to reload the page thanks to HTMX.
As this is a basic project to test HTMX functionality, contributions aren't necessary. However, if you'd like to extend the functionality or fix any issues, feel free to make a pull request.
This project is open source and available under the ISC License.