Generate Project
Detailed guide on generating project
Create application
-
Create project.
Change
myproject
to name of you project and run one of two following commands.Using Clojure CLI:
If you already have Clojure CLI with Clojure
1.12.x
anddeps-new
tool, then you can just run:OR alternatively using neil:
At the moment
neil
automatically adds:neil
alias todeps.edn
after generating the project. So, for now, you might want to delete it manually. -
Start development (with mise).
mise
is just convenient tool to manage system deps in version isolation for different projects. If you want, you can install all required tools manually, consult.mise.toml
for specific versions.The server should be available at http://localhost:8000.
Use alias instead of the tool
If you prefer to use deps.edn alias instead of -Tnew
tool, you can add a new alias to your global ~/.clojure/deps.edn
file:
Then you can create a new project using the following command:
This approach is also useful if you want to add your own default set of options, for example, you might want to create your projects always with DaisyUI included:
The same command will include :daisyui
option by default:
Options
The template offers customization options for generating your project.
:db
Choose between SQLite or PostgreSQL for your database (Default: :sqlite
)
Available values: :sqlite | :postgres
Usage example for PostgreSQL:
For local development the Docker is used to run PostgreSQL database.
:daisyui
Include DaisyUI, a component library for TailwindCSS (Default: false
)
Available values: false | true
Usage example for using DaisyUI:
:deploy
Choose between Kamal and no deployment configuration (Default: :kamal
)
Available values: :kamal | :none
Usage example for no deployment configuration:
After creating a project
After creating a project you will have a file structure and all configurations for starting development. First thing is recommended to do is checking the code formatting, linting, tests and outdated deps.
Now we can initiate git
and commit initial setup:
Now we can go to Github and create a repository to add it as a remote target to your local one: