Create the project
To create the project there are three different options available presented below.
- Scaffolding CLI
- GitHub Repository Clone
- .NET Core Template
The Amido Stacks Scaffolding CLI can be used to create a fully-functional and deployable project from a template, in a variety of flavours. It includes tests (unit, integration), together with infrastructure and deployment definitions. All by running from your CLI.
PROS
- Provides a guided project creation when generating the preferred project flavour.
- Enables the creation of all projects in Amido Stacks templates suite.
- Allows automated personalization of project name, domain model, company name.
- Removes out the content not needed from the GitHub repository.
CONS
- Requires npm and npx installation.
Create the project using the Scaffolding CLI
Install npm. It is provided with node.
Install npx to execute the scaffolding-cli.
Run the command to install npxnpm install -g npxCreate the project
Run Scaffolding-CLI command to start the project creationnpx @amidostacks/scaffolding-cli@latest run -iA series of questions will be asked to produce a guided choice of Amido Stacks project flavour. Based on the answers, the ready-to-build project template will be produced.
Create the project by cloning GitHub repository
Clone the .NET project to your local machine from here: stacks-dotnet repository
Create the project using the template
Install the package
Download the stacks-app-template.1.0.0.nupkg template package (.NET Core 3.1, current LTS release) to a temporary folder.
Run the command to install the packagedotnet new -i /path/to/stacks-app-template.1.0.0.nupkgCreate the project
Run the command to create the projectdotnet new stacks-app -n Company.Project -d DomainNameThe above command will create a folder and a repository called
Company.Project
.
Template parameter details
- -n
- Sets the project name
- Omitting it will result in the project name being the same as the folder where the command has been ran from
- -o
- Sets the path to where the project is added
- Omitting the parameter will result in the creation of a new folder
- -d, -Domain
- Sets the name of the aggregate root object. It is also the name of the collection within CosmosDB instance.