UNPKG

4.81 kBMarkdownView Raw
1# Initialize your project
2
3APEX Nitro needs to know a few things before connecting your APEX app.
4
5To initialize an APEX Nitro project, go to the directory where your files (JavaScript, CSS, other) will be.
6
7```bash
8cd /myprojectpath/
9```
10
11Our directory is currently empty:
12
13```bash
14|-/myprojectpath/
15```
16
17Execute the following command and a series of questions will be asked:
18
19```bash
20apex-nitro init
21```
22
23## Choosing a mode
24
25When you run `apex-nitro init`, the first question is "Pick a mode" and you will be asked to choose between Basic and Pro.
26
27- Basic mode is recommended for first time users as it a really simple way to get started
28- Pro mode is recommended for the best experience and the best performance
29
30![command-init](./img/command-init.png)
31
32After choosing a mode, the following questions will depend on the mode you picked.
33
34## Basic mode properties
35
36| Property | Description | Default |
37| ----------------------- | -------------------------------------------------------------------------------------------------------------------------------- | ------------- |
38| appName | Name of your APEX Nitro project |
39| appUrl | URL of your APEX app |
40| srcFolder | Path to where the source files are (relative to the current command line directory) | `./src` |
41| launch.port | Port that will be used to synchronize code in real time when using `apex-nitro launch` | `4000` |
42| launch.ghostMode | Clicks, Scrolls & Form inputs on any device will be mirrored to all devices during development when using `apex-nitro launch` | `false` |
43| launch.notify | Enables small notifications in the browser when code changes are detected when using `apex-nitro launch` | `true` |
44| launch.open | Opens your APEX app in your browser when using `apex-nitro launch` | `true` |
45| launch.openBuilder | Opens the APEX builder for your app when using `apex-nitro launch` | `false` |
46| upload.destination | Destination for your files when uploading them to the APEX Shared Components using `apex-nitro upload` | `application` |
47| upload.pluginName | Plugin internal name. Only applies if your `upload.destination` is `plugin` |
48| upload.path | Path to the binary files of SQLcl. Used for uploading files to the APEX Shared Component using `apex-nitro upload` | `sqlcl` |
49| upload.username | User to your APEX parsing schema. Used for uploading files to the APEX Shared Component using `apex-nitro upload` |
50| upload.password | (Optional) Password to your APEX parsing schema. Used for uploading files to the APEX Shared Component using `apex-nitro upload` |
51| upload.connectionString | Connection string to your APEX parsing schema. Used for uploading files to the APEX Shared Component using `apex-nitro upload` |
52
53![command-init-basic](./img/command-init-basic.png)
54
55## Pro mode properties
56
57TODO
58
59The properties will depend on which Pro template you picked.
60
61![command-init-pro](./img/command-init-pro.png)
62
63### Default
64
65More info: https://github.com/vincentmorneau/apex-nitro-template-default
66
67TODO
68
69![command-init-apex-nitro-template-default](./img/command-init-apex-nitro-template-default.png)
70
71### Custom Git repository
72
73Check with the Git repository for the properties it offers.
74
75## Creating the `apexnitro.config.json` file
76
77After running `apex-nitro init`, our directory now contains a project configuration file:
78
79```bash
80|-/myprojectpath/
81 |-apexnitro.config.json
82```
83
84The answers to the questions from `apex-nitro init` are saved to a file called `apexnitro.config.json` in the same directory as `apex-nitro init` was run. The content of `apexnitro.config.json` are the properties for your APEX Nitro project and it drives your APEX Nitro experience.
85
86## Modifying your `apexnitro.config.json` file
87
88If you wish to make modifications to your APEX Nitro project configuration, you can either:
89
901. Execute `apex-nitro init` again and overwrite current configuration.
911. Edit the project `apexnitro.config.json` file and make the changes needed.