azukiapp/azk

View on GitHub
docs/content/en/getting-started/configs-project.md

Summary

Maintainability
Test Coverage
# Setting up the project

The first step to use `azk` in any project is to create an `Azkfile.js` file. This file has the function to define the root directory of your project and also define the *application architecture*.

The `Azkfile.js` file can be created manually, but to make that process easier we have the `azk init` command. It's an `Azkfile.js` generator that will do the heavy lifting of figuring out how your application is designed and suggest a pre-configured `Azkfile.js`.

> Note: Remember that you may still have to edit the `Azkfile.js` generated by `azk init` so it can work correctly with your application.

```bash
$ cd azkdemo
$ azk init
azk: [azkdemo] A `node` system was detected at '/path/to/azkdemo'.
azk: [azkdemo] The image suggested was `{"docker":"azukiapp/node:0.12"}`.
azk: [azkdemo] ! It was not possible to detect the `node` specific version, so the standard version was suggested instead.
azk: [azkdemo] ! To change the image version you must edit the `Azkfile.js` file.
azk: [azkdemo] ! For more information see the documentation at http://docs.azk.io/en/images/index.html.
azk: 'Azkfile.js' generated

Tip:
  Adds the `.azk` to .gitignore
  echo '.azk' >> .gitignore
```

This should generate the following `Azkfile.js`:

!INCLUDE "../../common/getting-started/Azkfile_project_configure.md"

In the [Azkfile.js](../azkfilejs/README.md) section you can find detailed information on how to build an `Azkfile.js` and what options are available. For now, we have enough to run our application.