17.1 Creating a Project
Creating a project is the primary usage of the CLI. There primary command for creating a new project is create-app
. That will create a standard server application that communicates over HTTP. For other types of applications, see the documentation below.
Table 1. Micronaut CLI Project Creation Commands Command | Description | Options | Example |
---|
create-app
| Creates a basic Micronaut application. | -l , —lang
-t , —test
-b , —build
-f , —features
-i , —inplace
| mn create-app my-project —features mongo-reactive,security-jwt —build maven
|
create-cli-app
| Creates a command-line Micronaut application. | -l , —lang
-t , —test
-b , —build
-f , —features
-i , —inplace
| mn create-cli-app my-project —features http-client,jdbc-hikari —build maven —lang kotlin —test kotlintest
|
create-function-app
| Creates a Micronaut serverless function, using AWS by default. | -l , —lang
-t , —test
-b , —build
-f , —features
-i , —inplace
| mn create-function-app my-lambda-function —lang groovy —test spock
|
create-messaging-app
| Creates a Micronaut application that only communicates via a messaging protocol. Uses Kafka by default but can be switched to RabbitMQ with —features rabbitmq . | -l , —lang
-t , —test
-b , —build
-f , —features
-i , —inplace
| mn create-messaging-app my-broker —lang groovy —test spock
|
create-grpc-app
| Creates a Micronaut application that uses gRPC. | -l , —lang
-t , —test
-b , —build
-f , —features
-i , —inplace
| mn create-grpc-app my-grpc-app —lang groovy —test spock
|