This code contains the code for a blog post series I wrote on learning HTMx using Express and Firebase.
- Part I - Setting up
- Part II - Google Authentication
- Part III - Building the app
- Part IV - Advanced updates
- Part V - Validation
- Part VI - Clean up first page load
To build this I have used:
- Express
- Firebase (Authentication and storage)
- EJS Templates
- HTMx
-
Create a Firebase project
- Enable authentication - and copy the Google Client Id
- Enable Firestore - and copy the configuration
-
Clone the this repository
git clone https://github.com/marcusoftnet/htmx-todo-tutorial && cd htmx-todo-tutorial
-
Install the dependencies
npm install
-
Create an
.env
file in the root of the repository and add the following keys:PORT=<Your port number> APP_NAME=<Your application name> GOOGLE_CLIENT_ID=<From Firebase> SESSION_SECRET=<A made up secret> FIREBASE_APIKEY=<From Firebase> FIREBASE_AUTHDOMAIN=<From Firebase> FIREBASE_PROJECTID=<From Firebase> FIREBASE_STORAGEBUCKET=<From Firebase> FIREBASE_MESSAGINGSENDERID=<From Firebase> FIREBASE_APPID=<From Firebase>
-
Start the application in development mode
npm run dev