@lowdefy/docs 4.0.0-alpha.7 → 4.0.0-alpha.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (275) hide show
  1. package/dist/operators/client/filter_default_value.js +55 -0
  2. package/{public/modules/connectDocsearch.js → dist/operatorsClient.js} +1 -19
  3. package/{templates/blocks/schemaTransformer.js → dist/types.js} +5 -10
  4. package/package.json +19 -3
  5. package/404.yaml +0 -26
  6. package/CHANGELOG.md +0 -697
  7. package/actions/CallMethod.yaml +0 -57
  8. package/actions/JsAction.yaml +0 -281
  9. package/actions/Link.yaml +0 -120
  10. package/actions/Login.yaml +0 -123
  11. package/actions/Logout.yaml +0 -44
  12. package/actions/Message.yaml +0 -68
  13. package/actions/Notification.yaml +0 -84
  14. package/actions/Request.yaml +0 -70
  15. package/actions/Reset.yaml +0 -42
  16. package/actions/ResetValidation.yaml +0 -102
  17. package/actions/ScrollTo.yaml +0 -100
  18. package/actions/SetGlobal.yaml +0 -78
  19. package/actions/SetState.yaml +0 -85
  20. package/actions/Throw.yaml +0 -89
  21. package/actions/Validate.yaml +0 -104
  22. package/actions/Wait.yaml +0 -40
  23. package/blocks/all_icons.yaml +0 -803
  24. package/blocks/container/Affix.yaml +0 -26
  25. package/blocks/container/Alert.yaml +0 -27
  26. package/blocks/container/Badge.yaml +0 -27
  27. package/blocks/container/Box.yaml +0 -27
  28. package/blocks/container/Card.yaml +0 -29
  29. package/blocks/container/Collapse.yaml +0 -38
  30. package/blocks/container/Comment.yaml +0 -43
  31. package/blocks/container/ConfirmModal.yaml +0 -36
  32. package/blocks/container/Descriptions.yaml +0 -51
  33. package/blocks/container/Drawer.yaml +0 -46
  34. package/blocks/container/Label.yaml +0 -28
  35. package/blocks/container/Modal.yaml +0 -46
  36. package/blocks/container/PageHCF.yaml +0 -28
  37. package/blocks/container/PageHCSF.yaml +0 -29
  38. package/blocks/container/PageHSCF.yaml +0 -29
  39. package/blocks/container/PageHeaderMenu.yaml +0 -52
  40. package/blocks/container/PageSHCF.yaml +0 -29
  41. package/blocks/container/PageSiderMenu.yaml +0 -53
  42. package/blocks/container/Result.yaml +0 -34
  43. package/blocks/container/Span.yaml +0 -27
  44. package/blocks/container/Spin.yaml +0 -27
  45. package/blocks/container/Tabs.yaml +0 -41
  46. package/blocks/container/Tooltip.yaml +0 -38
  47. package/blocks/display/Anchor.yaml +0 -25
  48. package/blocks/display/Avatar.yaml +0 -23
  49. package/blocks/display/Breadcrumb.yaml +0 -28
  50. package/blocks/display/Button.yaml +0 -43
  51. package/blocks/display/DangerousHtml.yaml +0 -62
  52. package/blocks/display/DangerousMarkdown.yaml +0 -46
  53. package/blocks/display/Divider.yaml +0 -23
  54. package/blocks/display/EChart.yaml +0 -53
  55. package/blocks/display/Html.yaml +0 -50
  56. package/blocks/display/Icon.yaml +0 -23
  57. package/blocks/display/Img.yaml +0 -40
  58. package/blocks/display/Markdown.yaml +0 -31
  59. package/blocks/display/MarkdownWithCode.yaml +0 -46
  60. package/blocks/display/Menu.yaml +0 -48
  61. package/blocks/display/Message.yaml +0 -34
  62. package/blocks/display/MobileMenu.yaml +0 -47
  63. package/blocks/display/Notification.yaml +0 -34
  64. package/blocks/display/Paragraph.yaml +0 -30
  65. package/blocks/display/Progress.yaml +0 -52
  66. package/blocks/display/Skeleton.yaml +0 -27
  67. package/blocks/display/Statistic.yaml +0 -35
  68. package/blocks/display/Title.yaml +0 -32
  69. package/blocks/input/AutoComplete.yaml +0 -30
  70. package/blocks/input/ButtonSelector.yaml +0 -36
  71. package/blocks/input/CheckboxSelector.yaml +0 -36
  72. package/blocks/input/CheckboxSwitch.yaml +0 -56
  73. package/blocks/input/ChromeColorSelector.yaml +0 -24
  74. package/blocks/input/CircleColorSelector.yaml +0 -24
  75. package/blocks/input/ColorSelector.yaml +0 -24
  76. package/blocks/input/CompactColorSelector.yaml +0 -24
  77. package/blocks/input/DateRangeSelector.yaml +0 -26
  78. package/blocks/input/DateSelector.yaml +0 -26
  79. package/blocks/input/DateTimeSelector.yaml +0 -28
  80. package/blocks/input/GithubColorSelector.yaml +0 -24
  81. package/blocks/input/MonthSelector.yaml +0 -26
  82. package/blocks/input/MultipleSelector.yaml +0 -117
  83. package/blocks/input/NumberInput.yaml +0 -24
  84. package/blocks/input/Pagination.yaml +0 -33
  85. package/blocks/input/ParagraphInput.yaml +0 -32
  86. package/blocks/input/PasswordInput.yaml +0 -48
  87. package/blocks/input/RadioSelector.yaml +0 -36
  88. package/blocks/input/RatingSlider.yaml +0 -24
  89. package/blocks/input/S3UploadButton.yaml +0 -28
  90. package/blocks/input/Selector.yaml +0 -98
  91. package/blocks/input/SliderColorSelector.yaml +0 -24
  92. package/blocks/input/SwatchesColorSelector.yaml +0 -24
  93. package/blocks/input/Switch.yaml +0 -24
  94. package/blocks/input/TextArea.yaml +0 -27
  95. package/blocks/input/TextInput.yaml +0 -59
  96. package/blocks/input/TitleInput.yaml +0 -32
  97. package/blocks/input/TwitterColorSelector.yaml +0 -24
  98. package/blocks/input/WeekSelector.yaml +0 -26
  99. package/blocks/list/ControlledList.yaml +0 -191
  100. package/blocks/list/List.yaml +0 -157
  101. package/blocks/list/TimelineList.yaml +0 -136
  102. package/body.html +0 -1
  103. package/concepts/blocks.yaml +0 -249
  104. package/concepts/cli.yaml +0 -173
  105. package/concepts/connections-and-requests.yaml +0 -114
  106. package/concepts/context-and-state.yaml +0 -82
  107. package/concepts/custom-blocks.yaml +0 -190
  108. package/concepts/custom-code.yaml +0 -197
  109. package/concepts/events-and-actions.yaml +0 -224
  110. package/concepts/hosting-files.yaml +0 -50
  111. package/concepts/layout.yaml +0 -1464
  112. package/concepts/lists.yaml +0 -162
  113. package/concepts/lowdefy-schema.yaml +0 -245
  114. package/concepts/operators.yaml +0 -66
  115. package/concepts/overview.yaml +0 -48
  116. package/concepts/secrets.yaml +0 -56
  117. package/connections/AWSS3.yaml +0 -228
  118. package/connections/AmazonRedshift.yaml +0 -75
  119. package/connections/AxiosHttp.yaml +0 -194
  120. package/connections/Elasticsearch.yaml +0 -378
  121. package/connections/GoogleSheet.yaml +0 -332
  122. package/connections/Knex.yaml +0 -181
  123. package/connections/KnexRequests.md +0 -121
  124. package/connections/MSSQL.yaml +0 -90
  125. package/connections/MariaDB.yaml +0 -77
  126. package/connections/MongoDB.yaml +0 -581
  127. package/connections/MySQL.yaml +0 -92
  128. package/connections/OracleDB.yaml +0 -73
  129. package/connections/PostgreSQL.yaml +0 -99
  130. package/connections/Redis.yaml +0 -147
  131. package/connections/SQLite.yaml +0 -94
  132. package/connections/SendGridMail.yaml +0 -113
  133. package/connections/Stripe.yaml +0 -139
  134. package/deployment/aws-lambda.yaml +0 -128
  135. package/deployment/docker.yaml +0 -118
  136. package/deployment/netlify.yaml +0 -69
  137. package/deployment/node-server.yaml +0 -111
  138. package/head.html +0 -7
  139. package/howto/generate-csv.yaml.njk +0 -252
  140. package/howto/generate-pdf.yaml.njk +0 -651
  141. package/howto/generateCsv/lowdefy.yaml +0 -64
  142. package/howto/generateCsv/public/csvMake.js +0 -27
  143. package/howto/generatePdf/inv_template.yaml +0 -200
  144. package/howto/generatePdf/lowdefy.yaml +0 -117
  145. package/howto/generatePdf/my_header.html +0 -1
  146. package/howto/generatePdf/public/logo_example.png +0 -0
  147. package/howto/generatePdf/public/modules/importUmd.js +0 -7
  148. package/howto/generatePdf/public/modules/pdfMake.js +0 -7
  149. package/howto/generatePdf/public/modules/vfs_fonts.js +0 -12
  150. package/howto/use-refrences.md +0 -5
  151. package/introduction.yaml +0 -100
  152. package/lowdefy.yaml +0 -66
  153. package/menus.yaml +0 -832
  154. package/operators/_actions.yaml +0 -123
  155. package/operators/_and.yaml +0 -90
  156. package/operators/_args.yaml +0 -79
  157. package/operators/_array.yaml +0 -326
  158. package/operators/_base64.yaml +0 -56
  159. package/operators/_change_case.yaml +0 -347
  160. package/operators/_date.yaml +0 -71
  161. package/operators/_diff.yaml +0 -75
  162. package/operators/_divide.yaml +0 -46
  163. package/operators/_eq.yaml +0 -67
  164. package/operators/_event.yaml +0 -103
  165. package/operators/_format.yaml +0 -209
  166. package/operators/_function.yaml +0 -66
  167. package/operators/_get.yaml +0 -108
  168. package/operators/_global.yaml +0 -107
  169. package/operators/_gt.yaml +0 -65
  170. package/operators/_gte.yaml +0 -65
  171. package/operators/_hash.yaml +0 -109
  172. package/operators/_if.yaml +0 -44
  173. package/operators/_if_none.yaml +0 -61
  174. package/operators/_index.yaml +0 -65
  175. package/operators/_input.yaml +0 -114
  176. package/operators/_js.yaml +0 -189
  177. package/operators/_json.yaml +0 -128
  178. package/operators/_list_contexts.yaml +0 -37
  179. package/operators/_location.yaml +0 -59
  180. package/operators/_log.yaml +0 -36
  181. package/operators/_lt.yaml +0 -65
  182. package/operators/_lte.yaml +0 -65
  183. package/operators/_math.yaml +0 -374
  184. package/operators/_media.yaml +0 -86
  185. package/operators/_menu.yaml +0 -81
  186. package/operators/_mql.yaml +0 -101
  187. package/operators/_ne.yaml +0 -77
  188. package/operators/_not.yaml +0 -47
  189. package/operators/_number.yaml +0 -157
  190. package/operators/_nunjucks.yaml +0 -73
  191. package/operators/_object.yaml +0 -193
  192. package/operators/_operator.yaml +0 -47
  193. package/operators/_or.yaml +0 -81
  194. package/operators/_product.yaml +0 -59
  195. package/operators/_random.yaml +0 -104
  196. package/operators/_ref.yaml +0 -266
  197. package/operators/_regex.yaml +0 -83
  198. package/operators/_request.yaml +0 -50
  199. package/operators/_secret.yaml +0 -74
  200. package/operators/_state.yaml +0 -114
  201. package/operators/_string.yaml +0 -283
  202. package/operators/_subtract.yaml +0 -38
  203. package/operators/_sum.yaml +0 -59
  204. package/operators/_switch.yaml +0 -51
  205. package/operators/_type.yaml +0 -92
  206. package/operators/_uri.yaml +0 -56
  207. package/operators/_url_query.yaml +0 -120
  208. package/operators/_user.yaml +0 -107
  209. package/operators/_uuid.yaml +0 -114
  210. package/operators/_var.yaml +0 -105
  211. package/operators/_yaml.yaml +0 -107
  212. package/pages.yaml +0 -227
  213. package/public/images/authors/gervwyk.jpeg +0 -0
  214. package/public/images/authors/sandile.jpeg +0 -0
  215. package/public/images/howto/header_generate_csv.jpg +0 -0
  216. package/public/images/howto/header_generate_pdf.jpg +0 -0
  217. package/public/logo_example.png +0 -0
  218. package/public/lowdefy_app_schema.png +0 -0
  219. package/public/modules/csvMake.js +0 -27
  220. package/public/modules/filterDefaultValue.js +0 -48
  221. package/public/modules/importUmd.js +0 -7
  222. package/public/modules/index.js +0 -5
  223. package/public/modules/pdfMake.js +0 -7
  224. package/public/modules/test/filterDefaultValue.test.js +0 -91
  225. package/public/modules/vfs_fonts.js +0 -12
  226. package/public/sitemap.xml +0 -1024
  227. package/templates/actions.yaml.njk +0 -68
  228. package/templates/blocks/defaultValueTransformer.js +0 -53
  229. package/templates/blocks/exampleTransformer.js +0 -81
  230. package/templates/blocks/layout.yaml +0 -114
  231. package/templates/blocks/propertiesFormTransformer.js +0 -419
  232. package/templates/blocks/propertiesGetterTransformer.js +0 -132
  233. package/templates/blocks/schema.yaml.njk +0 -42
  234. package/templates/blocks/style.yaml +0 -26
  235. package/templates/blocks/template.yaml.njk +0 -495
  236. package/templates/blog.yaml.njk +0 -221
  237. package/templates/cli_command.yaml.njk +0 -37
  238. package/templates/footer.yaml.njk +0 -604
  239. package/templates/general.yaml.njk +0 -124
  240. package/templates/generateSitemap.js +0 -41
  241. package/templates/header.yaml +0 -138
  242. package/templates/navigation_buttons.yaml +0 -68
  243. package/templates/operators.yaml.njk +0 -82
  244. package/templates/operatorsMethodTransformer.js +0 -119
  245. package/templates/test/array.test.js +0 -1335
  246. package/templates/test/boolean.test.js +0 -98
  247. package/templates/test/button.test.js +0 -166
  248. package/templates/test/color.test.js +0 -126
  249. package/templates/test/enum.test.js +0 -105
  250. package/templates/test/icon.test.js +0 -109
  251. package/templates/test/integer.test.js +0 -99
  252. package/templates/test/manual.test.js +0 -238
  253. package/templates/test/number.test.js +0 -99
  254. package/templates/test/object.test.js +0 -434
  255. package/templates/test/oneOf.test.js +0 -794
  256. package/templates/test/string.test.js +0 -98
  257. package/templates/test/yaml.test.js +0 -605
  258. package/tutorial/next-steps.yaml +0 -83
  259. package/tutorial/tutorial-actions-operators-config.yaml +0 -142
  260. package/tutorial/tutorial-actions-operators.yaml +0 -436
  261. package/tutorial/tutorial-add-blocks-config.yaml +0 -109
  262. package/tutorial/tutorial-add-blocks.yaml +0 -195
  263. package/tutorial/tutorial-create-page-config.yaml +0 -77
  264. package/tutorial/tutorial-create-page.yaml +0 -196
  265. package/tutorial/tutorial-deploy.yaml +0 -146
  266. package/tutorial/tutorial-requests-config.yaml +0 -186
  267. package/tutorial/tutorial-requests.yaml +0 -338
  268. package/tutorial/tutorial-start.yaml +0 -282
  269. package/users/login-and-logout.yaml +0 -164
  270. package/users/openid-connect.yaml +0 -84
  271. package/users/protected-pages.yaml +0 -67
  272. package/users/roles.yaml +0 -70
  273. package/users/user-object.yaml +0 -73
  274. package/users/users-introduction.yaml +0 -80
  275. package/version.yaml +0 -1
@@ -1,139 +0,0 @@
1
- # Copyright 2020-2021 Lowdefy, Inc
2
-
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
-
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
-
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
- _ref:
16
- path: templates/general.yaml.njk
17
- vars:
18
- pageId: Stripe
19
- pageTitle: Stripe
20
- section: Connections
21
- filePath: connections/Stripe.yaml
22
- content:
23
- - id: markdown
24
- type: MarkdownWithCode
25
- properties:
26
- content: |
27
- ## Connections
28
-
29
- Connection types:
30
- - Stripe
31
-
32
- ### Stripe
33
-
34
- [Stripe](https://stripe.com/) is a popular payment provider which allows you to accept payments, send payouts, and manage your business online.
35
- The `Stripe` connector uses the official [Node.js client from Stripe](https://github.com/stripe/stripe-node).
36
- In order to use the `Stripe` connection, you first need to create a [Stripe](https://stripe.com/) account and setup an API key.
37
-
38
- > Secrets like API keys should be stored using the [`_secret`](operators/secret.md) operator.
39
-
40
- #### Properties
41
- - `secretKey: string`: __Required__ - Stripe [secret key](https://stripe.com/docs/keys).
42
- - `apiVersion: string`: Stripe API version to use. Defaults to the account-wide version.
43
- - `timeout: number`: Timeout for requests to the Stripe API.
44
- - `maxNetworkRetries: number`: Maximum number of times failed requests are repeated before throwing an error.
45
- - `telemetry: boolean`: Whether to send telemetry data to Stripe (this is forwarded to the Stripe client library. Lowdefy does not receive any telemetry data from your Stripe connection.)
46
-
47
- #### Examples
48
-
49
- ###### Simple connection:
50
- ```yaml
51
- connections:
52
- - id: stripe
53
- type: Stripe
54
- properties:
55
- secretKey:
56
- _secret: STRIPE_SECRET_KEY
57
- ```
58
- Environment variables:
59
- ```
60
- LOWDEFY_SECRET_STRIPE_SECRET_KEY = sk_test_KyvNyie...
61
- ```
62
-
63
- ###### Using an older API version:
64
- ```yaml
65
- connections:
66
- - id: stripe
67
- type: Stripe
68
- properties:
69
- secretKey:
70
- _secret: STRIPE_SECRET_KEY
71
- apiVersion: 2017-12-14
72
- ```
73
- Environment variables:
74
- ```
75
- LOWDEFY_SECRET_STRIPE_SECRET_KEY = sk_test_KyvNyie...
76
- ```
77
-
78
- ## Requests
79
-
80
- Request types:
81
- - StripeRequest
82
-
83
- ### StripeRequest
84
-
85
- The `StripeRequest` request allows calls to all modules supported by the [Stripe API client](https://stripe.com/docs/api?lang=node) by nesting the resource and method calls:
86
- ```yaml
87
- resource:
88
- method:
89
- - parameter1
90
- - parameter2
91
- ```
92
-
93
- #### Properties
94
- - `{{ apiResource }}: object`: A Stripe API resource, eg. `customers`.
95
- - `{{ method }}: array | null`: A resource method, eg. `create`. The arguments array will be passed on to the client method.
96
-
97
- The Stripe client exposes all resources as objects, with the API methods being available as function properties on those resource objects.
98
- In Lowdefy, you may access these properties by nesting them.
99
-
100
- ### Examples
101
-
102
- ###### List the 30 most recent customers
103
- ```yaml
104
- requests:
105
- - id: list_customers
106
- type: StripeRequest
107
- connectionId: stripe
108
- properties:
109
- customers:
110
- list:
111
- limit: 30
112
- ```
113
-
114
- ###### Create a payment intent
115
- ```yaml
116
- requests:
117
- - id: create_payment_intent
118
- type: StripeRequest
119
- connectionId: stripe
120
- properties:
121
- paymentIntents:
122
- create:
123
- - amount: 2000
124
- currency: eur
125
- payment_method_types: [ card ]
126
- ```
127
-
128
- ###### Retrieve a checkout session by ID
129
- ```yaml
130
- requests:
131
- - id: retrieve_checkout_session
132
- type: StripeRequest
133
- connectionId: stripe
134
- properties:
135
- checkout:
136
- sessions:
137
- retrieve:
138
- - cs_test_onpT2icY2lrSU0IgDGXEhhcOHcWeJS5BpLcQGMx0uI9TZHLMBdzvWpvx
139
- ```
@@ -1,128 +0,0 @@
1
- # Copyright 2020-2021 Lowdefy, Inc
2
-
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
-
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
-
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
- _ref:
16
- path: templates/general.yaml.njk
17
- vars:
18
- pageId: aws-lambda
19
- pageTitle: Deploy with AWS Lambda
20
- section: Deployment
21
- filePath: deployment/aws-lambda.yaml
22
- content:
23
- - id: md1
24
- type: Markdown
25
- properties:
26
- content: |
27
- Lowdefy apps can be deployed to AWS Lambda serverless functions by using the [lowdefy/lowdefy-aws-lambda](https://hub.docker.com/repository/docker/lowdefy/lowdefy-aws-lambda) Docker images. These images contain a Lowdefy app server. To deploy to AWS Lambda a new image that contains the app configuration, based on the Lowdefy base image, should be built. This image should then be pushed to a private AWS ECR registry. From there it can be used to create a Lambda function.
28
-
29
- The [serverless framework](https://www.serverless.com) can be used to simplify the deployment. The serverless framework create a ECR registry if it does not exist, build the Docker image, push to the registry and deploy an AWS Lambda function with a API Gateway HTTP api integration.
30
-
31
- An example can be found in the [lowdefy-example-aws-lambda](https://github.com/lowdefy/lowdefy-example-aws-lambda) repository.
32
-
33
- ## Deploying to AWS Lambda
34
-
35
- ### Requirements
36
-
37
- - The [AWS CLI](https://aws.amazon.com/cli/) should be installed and authenticated.
38
- - You should have [Docker](https://docs.docker.com/get-docker/) installed.
39
-
40
- ### Step 1 - Create a Dockerfile
41
-
42
- Create a file called `Dockerfile` in your project repository:
43
-
44
- ```
45
- FROM node:14-buster AS build
46
-
47
- # Set working directory and node user
48
- WORKDIR /home/node/lowdefy
49
-
50
- RUN chown node:node /home/node/lowdefy
51
-
52
- USER node
53
-
54
- # Copy app config, and change ownership of files to "node" user
55
- COPY --chown=node:node . .
56
-
57
- # Build the Lowdefy config using the Lowdefy CLI
58
- RUN npx lowdefy@3.23.2 build
59
-
60
- # Use the correct Lowdefy base image
61
- FROM lowdefy/lowdefy-aws-lambda:3.23.2
62
-
63
- # Copy build output from build stage
64
- COPY --from=build /home/node/lowdefy/.lowdefy/build ./build
65
-
66
- # Copy contents of public directory into image
67
- COPY ./public ./public
68
-
69
- # Lambda handler
70
- CMD [ "dist/server.handler"]
71
- ```
72
-
73
- - id: warning_update_dockerfile
74
- type: Alert
75
- properties:
76
- type: warning
77
- icon: AiFilledWarning
78
- description: When updating your app to a new Lowdefy version, make sure to update the Lowdefy version in the Dockerfile
79
-
80
- - id: md2
81
- type: Markdown
82
- properties:
83
- content: |
84
- ### Step 2 - Create a `.dockerignore` file
85
-
86
- Create a file called `.dockerignore` in your project repository:
87
-
88
- ```
89
- .lowdefy/**
90
- .serverless/**
91
- .env
92
- ```
93
-
94
- ### Step 3 - Create a serverless.yaml file
95
-
96
- Create a file called `serverless.yaml` in your project repository:
97
-
98
- ```
99
- service: lowdefy-example-aws-lambda
100
- frameworkVersion: '2'
101
- provider:
102
- name: aws
103
- region: us-east-1
104
- ecr:
105
- images:
106
- lowdefy:
107
- path: .
108
- file: Dockerfile
109
-
110
- functions:
111
- lowdefy-server:
112
- image: lowdefy
113
- name: lowdefy-example-aws-lambda-${opt:stage}
114
- # Set secrets as environment variables here
115
- # environment:
116
- # LOWDEFY_SECRET_MY_SECRET: ${env:LOWDEFY_SECRET_MY_SECRET}
117
-
118
- events:
119
- - httpApi: '*'
120
- ```
121
-
122
- ### Step 4 - Deploy to AWS
123
-
124
- Deploy to AWS by running:
125
-
126
- ```
127
- npx serverless deploy --verbose --conceal --stage dev
128
- ```
@@ -1,118 +0,0 @@
1
- # Copyright 2020-2021 Lowdefy, Inc
2
-
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
-
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
-
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
- _ref:
16
- path: templates/general.yaml.njk
17
- vars:
18
- pageId: docker
19
- pageTitle: Deploy with Docker
20
- section: Deployment
21
- filePath: deployment/docker.yaml
22
- content:
23
- - id: md1
24
- type: Markdown
25
- properties:
26
- content: |
27
- The [official Lowdefy Docker](https://hub.docker.com/repository/docker/lowdefy/lowdefy) images can be found on Docker Hub.
28
-
29
- Examples of Docker configuration can be found in the [example repository](https://github.com/lowdefy/lowdefy-example-docker).
30
-
31
- The Lowdefy Docker images contain a Lowdefy server. The configuration of the Lowdefy app can either be built into a new image based on the Lowdefy image, or the configuration read from the file system, usually provided as a volume.
32
-
33
- The Lowdefy server can be configured using the following environment variables:
34
-
35
- - `LOWDEFY_BASE_PATH`: Set the base path to serve the Lowdefy application from. This will serve the application under `https://example.com/<base-path>`instead of `https://example.com`, and all pages under `https://example.com/<base-path>/<page-id>` instead of the default `https://example.com/<page-id>`.
36
- - `LOWDEFY_SERVER_BUILD_DIRECTORY`: The directory of the built Lowdefy configuration (The output of `lowdefy build`, usually found at `./.lowdefy/build` in your project repository). The default is `./build` (or `/home/node/lowdefy/build`).
37
- - `LOWDEFY_SERVER_PUBLIC_DIRECTORY`: The directory of the public assets to be served. The default is `./public` (or `/home/node/lowdefy/public`).
38
- - `LOWDEFY_SERVER_PORT`: The port (inside the container) at which to run the server. The default is `3000`.
39
-
40
- - id: warning_update_dockerfile
41
- type: Alert
42
- properties:
43
- type: warning
44
- icon: AiFilledWarning
45
- description: When updating your app to a new Lowdefy version, make sure to update the Lowdefy version in the Dockerfile
46
-
47
- - id: md2
48
- type: Markdown
49
- properties:
50
- content: |
51
- # Building a Lowdefy app image
52
-
53
- To build the configuration into an image, the following Dockerfile can be used:
54
- ```text
55
- FROM node:14-buster AS build
56
-
57
- # Set working directory and node user
58
- WORKDIR /home/node/lowdefy
59
-
60
- RUN chown node:node /home/node/lowdefy
61
-
62
- USER node
63
-
64
- # Copy app config and change ownership of files to "node" user
65
- COPY --chown=node:node . .
66
-
67
- # Build the Lowdefy config using the Lowdefy CLI
68
- RUN npx lowdefy@3.23.2 build
69
-
70
- # Use the correct Lowdefy base image
71
- FROM lowdefy/lowdefy:3.23.2
72
-
73
- # Copy build output from build stage
74
- COPY --from=build --chown=node:node /home/node/lowdefy/.lowdefy/build ./build
75
-
76
- # Copy contents of public directory into image
77
- COPY --chown=node:node ./public ./public
78
-
79
- # Run the server on start
80
- CMD ["node", "./dist/server.js"]
81
- ```
82
-
83
- with a `.dockerignore` file:
84
-
85
- ```
86
- .lowdefy/**
87
- .env
88
- ```
89
-
90
- An image can be built by running:
91
- ```
92
- docker build -t <tag> .
93
- ```
94
-
95
- The container can be run by:
96
- ```
97
- docker run -p 3000:3000 <tag>
98
- ```
99
-
100
- Docker compose can also be used. Use a `docker-compose.yaml` file:
101
- ```
102
- version: "3.8"
103
- services:
104
- lowdefy:
105
- build: .
106
- ports:
107
- - "3000:3000"
108
- ```
109
-
110
- To build the image, run:
111
- ```
112
- docker compose build
113
- ```
114
-
115
- To run the app, run:
116
- ```
117
- docker compose up
118
- ```
@@ -1,69 +0,0 @@
1
- # Copyright 2020-2021 Lowdefy, Inc
2
-
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
-
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
-
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
- _ref:
16
- path: templates/general.yaml.njk
17
- vars:
18
- pageId: netlify
19
- pageTitle: Deploy to Netlify
20
- section: Deployment
21
- filePath: deployment/netlify.yaml
22
- content:
23
- - id: md1
24
- type: MarkdownWithCode
25
- properties:
26
- content: |
27
- Lowdefy apps can be deployed to [Netlify](https://www.netlify.com). Netlify integrates with git providers to automatically deploy your app when you merge changes into the main branch of your repository and deploy previews of pull requests. On your Netlify deployment you can set environment variables, manage custom domains and more.
28
-
29
- ## How to Deploy to Netlify
30
-
31
- #### Step 1
32
-
33
- Your project will need to be hosted as a Github repository.
34
-
35
- #### Step 2
36
-
37
- Link your Github project to Netlify.
38
-
39
- - Once logged in to Netlify, click the "New site from git" button.
40
- - Choose Github, and authorize Netlify to access your repositories.
41
- - Select your repository.
42
-
43
- > If your repository isn't found, click "Configure Netlify on Github", and give Netlify access to your repository.
44
-
45
- #### Step 3
46
-
47
- Configure your Netlify deployment.
48
-
49
- - Set your build command to `npx lowdefy@3 build-netlify`.
50
- - Set your publish directory to `.lowdefy/publish`.
51
-
52
- #### Step 4
53
-
54
- Configure the Lowdefy server.
55
-
56
- - Click the "Advanced build settings" button.
57
- - Set the functions directory to `.lowdefy/functions`.
58
-
59
- #### Step 5
60
-
61
- Deploy your site.
62
-
63
- - Click "Deploy site"
64
-
65
- On the "Site overview" tab you will find your site url.
66
-
67
- #### Step 6
68
-
69
- To set Lowdefy secrets, go to "Site settings", then "Build and deploy" in the left menu. Scroll down and select "Edit variables" in the "Environment" section. Here you can set the `LOWDEFY_SECRET_` environment variables.
@@ -1,111 +0,0 @@
1
- # Copyright 2020-2021 Lowdefy, Inc
2
-
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
-
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
-
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
- _ref:
16
- path: templates/general.yaml.njk
17
- vars:
18
- pageId: node-server
19
- pageTitle: Deploy with Node.js
20
- section: Deployment
21
- filePath: deployment/node-server.yaml
22
- content:
23
- - id: md1
24
- type: Markdown
25
- properties:
26
- content: |
27
- A production Lowdefy server that runs using Node.js is published on npm as [@lowdefy/server-node](https://www.npmjs.com/package/@lowdefy/server-node).
28
-
29
- ## Running the server
30
-
31
- ### Step 1 - Create a `package.json` file
32
-
33
- To run the server in a Lowdefy project, first initialise a Node.js project by creating a `package.json` file in the root of your project. To do this, you can run
34
-
35
- ```
36
- npm init
37
- ```
38
-
39
- ### Step 2 - Add the `@lowdefy/server-node` package to your project as a dependency
40
-
41
- To add the server as a dependency, run
42
-
43
- ```
44
- npm install @lowdefy/server-node --save --save-exact
45
- ```
46
-
47
- ### Step 3 - Add the Lowdefy CLI to you project as a dev dependency.
48
-
49
- To add the server as a dependency, run:
50
-
51
- ```
52
- npm install lowdefy --save-dev --save-exact
53
- ```
54
-
55
- ### Step 4 - Add the `build` and `start` scripts.
56
-
57
- Add the following to the `scripts` section in your `package.json` file:
58
-
59
- ```json
60
- "scripts": {
61
- "init": "lowdefy init",
62
- "build": "lowdefy build",
63
- "start": "lowdefy-server"
64
- },
65
- ```
66
-
67
- ### Step 5 - Init a Lowdefy project
68
-
69
- Run:
70
-
71
- ```
72
- npm run init
73
- ```
74
-
75
- ### Step 6 - Add the public files:
76
-
77
- Create a folder called `public` in your project directory and add the Lowdefy public files found [here](https://github.com/lowdefy/lowdefy/tree/main/packages/shell/src/public) (or add your own logos and files).
78
-
79
- ### Step 7 - Build the Lowdefy project
80
-
81
- Build the Lowdefy configuration files in the project by running:
82
-
83
- ```
84
- npm run build
85
- ```
86
-
87
- ### Step 8 - Start the server
88
-
89
- To start the server, run:
90
-
91
- ```
92
- npm run start
93
- ```
94
-
95
- ## Configuration
96
-
97
- The Lowdefy server can be configured using command-line arguments or environment variables. The command-line arguments take precedence over the environment variables.
98
-
99
- The following command-line arguments can be specified:
100
-
101
- - `--build-directory`: The directory of the built Lowdefy configuration (The output of `lowdefy build`, usually found at `./.lowdefy/build` in your project repository). The default is `./.lowdefy/build`.
102
- - `--port`: The port at which to run the server. The default is `3000`.
103
- - `--public-directory`: The directory of the public assets to be served. The default is `./public`.
104
-
105
-
106
- The following environment variables can be specified:
107
-
108
- - `LOWDEFY_BASE_PATH`: Set the base path to serve the Lowdefy application from. This will serve the application under `https://example.com/<base-path>`instead of `https://example.com`, and all pages under `https://example.com/<base-path>/<page-id>` instead of the default `https://example.com/<page-id>`.
109
- - `LOWDEFY_SERVER_BUILD_DIRECTORY`: The directory of the built Lowdefy configuration (The output of `lowdefy build`, usually found at `./.lowdefy/build` in your project repository). The default is `./.lowdefy/build`.
110
- - `LOWDEFY_SERVER_PORT`: The port at which to run the server. The default is `3000`.
111
- - `LOWDEFY_SERVER_PUBLIC_DIRECTORY`: The directory of the public assets to be served. The default is `./public`.
package/head.html DELETED
@@ -1,7 +0,0 @@
1
- <script type="module" src="/public/modules/index.js"></script>
2
- <link
3
- rel="stylesheet"
4
- href="https://cdn.jsdelivr.net/npm/docsearch.js@2.6.3/dist/cdn/docsearch.min.css"
5
- />
6
- <script defer type="module" src="/public/modules/pdfMake.js"></script>
7
- <script defer type="module" src="/public/modules/csvMake.js"></script>