The Project Template is a base template used to create a new nio project with the recommended files and file structure.
How to Use
Clone this project template using the nio command line interface (CLI) or Git.
Clone Using the nio CLI
You can create a new project directory with the nio-cli
pip3 install nio-cli nio new <new_project_name>
Clone Using Git
To clone the project template using Git
- Create a shallow clone of the template.
git clone --depth=1 https://github.com/niolabs/project_template.git <new_project_name>
- Navigate to your new project directory.
- Initialize the submodules containing the blocks and the service test tools.
git submodule update --init --recursive
- Remove the tracking link to the original template repository.
git remote remove origin
- Reset ownership to yourself.
git commit --amend --reset-author -m "Initial Commit"
To push your project to GitHub (or another remote repository)
- Create a new online repository for your project.
- Copy the unique URL for your new repository to your clipboard.
- In your local repository, from the command line, add the remote tracking information for the new repository.
git remote add origin <new_project_repo_URL>
- Push to a branch (usually
git push --set-upstream origin master
A directory that contains block types, as submodules. The project template comes with a few of the most commonly used block types. Block types can be added and removed. Additional block types can be found in the block library and added through the System Designer, or, you can add your own custom block types here.
A folder containing project configurations and scripts.
A submodule for service tests that includes
NioServiceTestCase and other tools for service testing.
A folder for your tests with an example set up for a service test.
An optional script to create a Docker image of the project. Docker can be used as a tool in deployments.
A file optionally used in conjunction with Docker to configure your application so that all its dependencies can be started with a single command.
nio.conf A simple project configuration file that has reasonable defaults set for you.
A file that contains the reference for all nio project configuration options. Default values are shown. If this file contains secrets, you will want to add it to the
pk_server.conf A project configuration file that can be included to run your binary with a standlone pubkeeper server. This is a partial config file so it should be included with another more complete configuration file. Example:
niod -s nio.conf -s pk_server.conf