A sample project that shows how to support modal forms with ambiorix + htmx.
Persistent storage has been implemented using MongoDB.
- We first explore the different types of modals.
- Then movie table.
- Add new movie.
- Input validation.
- An installation of the community edition of MongoDB
- Clone this repo and
cd
into themodals/
directory:git clone git@github.com:kennedymwavu/ambiorix-htmx.git cd ambiorix-htmx/modals
- Add an env file (
.Renviron
) at the root dir of the project with these variables:You can change the default values if you wish.MONGO_DB = ambiorix-htmx MODALS_COLLECTION = modals HOST = 127.0.0.1 PORT = 8000 RENV_CONFIG_SANDBOX_ENABLED = FALSE
- Fire up R and install the dependencies:
renv::restore()
index.R
is the entry point of the app. Run the following command to start the app.
Rscript index.R