Skip to content

Commit 8f0ecda

Browse files
authored
Project create example (#26)
1 parent f543e74 commit 8f0ecda

File tree

3 files changed

+67
-1
lines changed

3 files changed

+67
-1
lines changed

Diff for: docs/project-creating-your-own.md

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
---
2+
id: nim-creating-project
3+
title: Creating your project
4+
sidebar_label: Creating your project
5+
---
6+
7+
import useBaseUrl from '@docusaurus/useBaseUrl';
8+
9+
### Creating your project template with the Nimbella CLI
10+
11+
With the Nimbella CLI, you can create a project template that you can use to instantly start building your project.
12+
13+
To create a project template, run this command in your command prompt:
14+
15+
```
16+
nim project create folder_name
17+
```
18+
19+
After running this command in your command prompt, you should see a message saying your project folder is available.
20+
21+
<img alt="Docusaurus with Keytar" src={useBaseUrl('static/img/nim-project-create-ex.png')} />
22+
23+
### Creating a YAML file for your project
24+
25+
**NOTE**: What makes Nimbella standout is that you don't need a YAML file for most simple projects. But if you want to customize specific things you are deploying, you can build a `.yml` file for it.
26+
27+
To generate a `.yml` file when you create a project. Run the command:
28+
29+
```
30+
nim project create folder_name --config
31+
```
32+
33+
The `--config` flag tells the CLI to generate a `.yml` template you can use for your project. You should see this template inside of your project folder:
34+
35+
```
36+
targetNamespace: ''
37+
cleanNamespace: false
38+
bucket: {}
39+
parameters: {}
40+
environment: {}
41+
packages:
42+
- name: default
43+
shared: false
44+
clean: false
45+
environment: {}
46+
parameters: {}
47+
annotations: {}
48+
actions:
49+
- name: hello
50+
clean: false
51+
binary: false
52+
main: ''
53+
runtime: 'nodejs:default'
54+
web: true
55+
webSecure: false
56+
parameters: {}
57+
environment: {}
58+
annotations: {}
59+
limits: {}
60+
```
61+
62+
### Basics of the project structure.
63+
64+
After creating the project folder, you'll see that it contains two folders. A `web` folder to add directories and files with static web content and a `packages` folder to create serverless functions.
65+
66+
[Click here to learn more about the project structure you just created.](https://github.com/nimbella/docs/blob/master/docs/projects.md)

Diff for: sidebars.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ module.exports = {
3232
'workbench-playground-introduction',
3333
'workbench-playground-exports',
3434
],
35-
'Getting Started': ['getting-started', 'building'],
35+
'Getting Started': ['getting-started', 'building', 'nim-creating-project'],
3636
'Developing and Deploying Serverless APIs': [
3737
'sample-project-walkthrough',
3838
'basic-kv-commands',

Diff for: static/img/nim-project-create-ex.png

19.4 KB
Loading

0 commit comments

Comments
 (0)