You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 15, 2021. It is now read-only.
#### 2. Run the following in the root folder of your project. This will configure your project for {{ PRODUCT_NAME }}.
61
61
62
62
```bash
63
-
xdn init
63
+
{{ CLI_NAME }} init
64
64
```
65
65
66
66
This will automatically add all of the required dependencies and files to your project. These include:
@@ -73,14 +73,14 @@ This will automatically add all of the required dependencies and files to your p
73
73
74
74
#### 3. Use the right angular project
75
75
76
-
If you have several projects and the `defaultProject` as specified in `angular.json` is not the project with the SSR build, specify the correct project with the `ANGULAR_PROJECT` environment variable. For example: `ANGULAR_PROJECT=my-ssr-project xdn build`.
76
+
If you have several projects and the `defaultProject` as specified in `angular.json` is not the project with the SSR build, specify the correct project with the `ANGULAR_PROJECT` environment variable. For example: `ANGULAR_PROJECT=my-ssr-project {{ CLI_NAME }} build`.
77
77
78
78
## Routing
79
79
80
-
The default `routes.js` file created by `xdn init` sends all requests to Angular server via a fallback route.
80
+
The default `routes.js` file created by `{{ CLI_NAME }} init` sends all requests to Angular server via a fallback route.
81
81
82
82
```js
83
-
// This file was automatically added by xdn deploy.
83
+
// This file was automatically added by {{ CLI_NAME }} deploy.
You can do a production build of your app and test it locally using:
123
123
124
124
```bash
125
-
xdn build &&xdn run --production
125
+
{{ CLI_NAME }} build &&{{ CLI_NAME }} run --production
126
126
```
127
127
128
128
Setting `--production` runs your app exactly as it will be when deployed to the Moovweb cloud.
129
129
130
-
If you have several projects and the `defaultProject` in `angular.json` is not the project you would like to deploy, specify the correct project by setting the `ANGULAR_PROJECT` environment variable when running `xdn run`.
130
+
If you have several projects and the `defaultProject` in `angular.json` is not the project you would like to deploy, specify the correct project by setting the `ANGULAR_PROJECT` environment variable when running `{{ CLI_NAME }} run`.
131
131
132
132
For example:
133
133
134
134
```
135
-
ANGULAR_PROJECT=my-project xdn run
135
+
ANGULAR_PROJECT=my-project {{ CLI_NAME }} run
136
136
```
137
137
138
138
## Deploying
139
139
140
140
Deploying requires an account on {{ PRODUCT_NAME }}. [Sign up here for free.](https://moovweb.app/signup) Once you have an account, you can deploy to {{ PRODUCT_NAME }} by running the following in the root folder of your project:
141
141
142
142
```bash
143
-
xdn deploy
143
+
{{ CLI_NAME }} deploy
144
144
```
145
145
146
-
If you have several projects and the `defaultProject` in `angular.json` is not the project you would like to deploy, specify the correct project by setting the `ANGULAR_PROJECT` environment variable when running `xdn deploy`.
146
+
If you have several projects and the `defaultProject` in `angular.json` is not the project you would like to deploy, specify the correct project by setting the `ANGULAR_PROJECT` environment variable when running `{{ CLI_NAME }} deploy`.
Copy file name to clipboardExpand all lines: guides/caching.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -271,7 +271,7 @@ The response was not cached because it was received during the brief time (less
271
271
By default, caching is turned off during development. This is done to ensure that developers don't see stale responses after making changes to their code or other upstream APIs. You can enable caching during development by running your app with:
272
272
273
273
```bash
274
-
xdn dev --cache
274
+
{{ CLI_NAME }} dev --cache
275
275
```
276
276
277
277
The cache will automatically be cleared when you make changes to your router. A few aspects of caching are not yet supported during local development:
@@ -288,14 +288,14 @@ The cache is automatically cleared when you deploy to an environment. You can al
288
288
The cache can be [cleared via the CLI](/guides/cli#section_cache_clear):
The cache can also be [cleared via the REST API](/guides/rest_api#section_clear_cache).
295
295
296
296
## Static prerendering after clearing the cache
297
297
298
-
If you have [static prerendering] enabled, the cache will automatically be repopulated when you clear all entries from the cache (when you select "Purge all entries" in {{ PRODUCT_NAME }} Developer Console or run `xdn cache-clear` without providing `--path` or `--surrogate-key`). You can view the prerendering progress by clicking on the active deployment for the environment that was cleared.
298
+
If you have [static prerendering] enabled, the cache will automatically be repopulated when you clear all entries from the cache (when you select "Purge all entries" in {{ PRODUCT_NAME }} Developer Console or run `{{ CLI_NAME }} cache-clear` without providing `--path` or `--surrogate-key`). You can view the prerendering progress by clicking on the active deployment for the environment that was cleared.
299
299
300
300
## Preserving the cache when deploying a new version of your site
301
301
@@ -343,11 +343,11 @@ These scripts assume that you have created environments called "production", "st
@@ -115,12 +115,12 @@ Open the {{ PRODUCT_NAME }} documentation in your browser.
115
115
#### Example
116
116
117
117
```bash
118
-
xdn docs
118
+
{{ CLI_NAME }} docs
119
119
```
120
120
121
121
### dev
122
122
123
-
Runs your project in development mode, simulating the {{ PRODUCT_NAME }} cloud environment. This command is a simplified version of `xdn run`, with only the --cache option being supported.
123
+
Runs your project in development mode, simulating the {{ PRODUCT_NAME }} cloud environment. This command is a simplified version of `{{ CLI_NAME }} run`, with only the --cache option being supported.
124
124
125
125
#### Options
126
126
@@ -131,7 +131,7 @@ Runs your project in development mode, simulating the {{ PRODUCT_NAME }} cloud e
131
131
#### Example
132
132
133
133
```bash
134
-
xdn dev
134
+
{{ CLI_NAME }} dev
135
135
```
136
136
137
137
### init
@@ -141,7 +141,7 @@ Run in an existing app to add all required packages and files need to publish yo
141
141
#### Example
142
142
143
143
```bash
144
-
xdn init
144
+
{{ CLI_NAME }} init
145
145
```
146
146
147
147
#### Options
@@ -157,7 +157,7 @@ Logs into {{ PRODUCT_NAME }} via the developer console.
157
157
#### Example
158
158
159
159
```bash
160
-
xdn login
160
+
{{ CLI_NAME }} login
161
161
```
162
162
163
163
### logout
@@ -167,30 +167,30 @@ Logs out of {{ PRODUCT_NAME }}
167
167
#### Example
168
168
169
169
```bash
170
-
xdnlogout
170
+
{{ CLI_NAME }}logout
171
171
```
172
172
173
173
### run
174
174
175
-
Runs your app locally. Uses port 3000 by default. You can change this by setting the `PORT` environment variable. For example: `PORT=5000 xdn run`.
175
+
Runs your app locally. Uses port 3000 by default. You can change this by setting the `PORT` environment variable. For example: `PORT=5000 {{ CLI_NAME }} run`.
|`--production`| Runs a production build of your app, simulating the cloud environment. This can also be achieved by setting the NODE_ENV environment variable to `true`. You need to run `xdn build` first.|
181
+
|`--production`| Runs a production build of your app, simulating the cloud environment. This can also be achieved by setting the NODE_ENV environment variable to `true`. You need to run `{{ CLI_NAME }} build` first. |
182
182
|`--cache`| Enables caching during local development so that you can test the caching logic in your router. By default caching is turned off in local development to ensure you don't see stale responses as you make changes to your code. |
183
183
184
184
#### Example
185
185
186
186
```bash
187
-
xdn run --production
187
+
{{ CLI_NAME }} run --production
188
188
```
189
189
190
190
Or to run a deployment bundle downloaded from {{ PRODUCT_NAME }} Developer Console, use:
191
191
192
192
```bash
193
-
xdn run /path/to/bundle.zip
193
+
{{ CLI_NAME }} run /path/to/bundle.zip
194
194
```
195
195
196
196
Production mode is always used whe running downloaded bundles.
@@ -204,17 +204,17 @@ Switches the version of all {{ PACKAGE_NAME }}/\* packages in your project.
Copy file name to clipboardExpand all lines: guides/connectors.md
+13-13Lines changed: 13 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,23 +1,23 @@
1
1
# Connectors
2
2
3
-
Connector packages help build and run your app within {{ PRODUCT_NAME }}. When you run `xdn init`, {{ PRODUCT_NAME }} CLI detects the framework used by your app and installs the corresponding connector package. For example, if you use Next.js, `{{ PACKAGE_NAME }}/next` will be installed. If no connector package exists for the framework that you use, you can still deploy to {{ PRODUCT_NAME }} by implementing the connector interface directly in your app.
3
+
Connector packages help build and run your app within {{ PRODUCT_NAME }}. When you run `{{ CLI_NAME }} init`, {{ PRODUCT_NAME }} CLI detects the framework used by your app and installs the corresponding connector package. For example, if you use Next.js, `{{ PACKAGE_NAME }}/next` will be installed. If no connector package exists for the framework that you use, you can still deploy to {{ PRODUCT_NAME }} by implementing the connector interface directly in your app.
4
4
5
5
## Writing a connector
6
6
7
7
A {{ PRODUCT_NAME }} connector consists of four entry points:
8
8
9
-
-`init.js` - Called when the user runs `xdn init`, adding resources to the project necessary for deploying on {{ PRODUCT_NAME }}. May also modify existing files with the project.
10
-
-`dev.js` - Called when the user runs `xdn dev` to run their app in development mode.
11
-
-`build.js` - Called when the user runs `xdn build` or `xdn deploy`. Builds the application, copying resources into the `.{{ PRODUCT_NAME_LOWER }}` directory, which is ultimately zipped and uploaded to {{ PRODUCT_NAME }}.
9
+
-`init.js` - Called when the user runs `{{ CLI_NAME }} init`, adding resources to the project necessary for deploying on {{ PRODUCT_NAME }}. May also modify existing files with the project.
10
+
-`dev.js` - Called when the user runs `{{ CLI_NAME }} dev` to run their app in development mode.
11
+
-`build.js` - Called when the user runs `{{ CLI_NAME }} build` or `{{ CLI_NAME }} deploy`. Builds the application, copying resources into the `.{{ PRODUCT_NAME_LOWER }}` directory, which is ultimately zipped and uploaded to {{ PRODUCT_NAME }}.
12
12
-`prod.js` - Starts the application server in {{ PRODUCT_NAME }} cloud's serverless environment.
13
13
14
14
These files should be placed in the root directory of your connector package.
15
15
16
16
## init.js
17
17
18
-
Called when the user runs `xdn init`. This entry point adds resources to the project necessary for deploying on {{ PRODUCT_NAME }}. It may also modify existing files within the project.
18
+
Called when the user runs `{{ CLI_NAME }} init`. This entry point adds resources to the project necessary for deploying on {{ PRODUCT_NAME }}. It may also modify existing files within the project.
19
19
20
-
_Optional, if not provided, xdn init will add a default router and {{ CONFIG_FILE }} to the user's project._
20
+
_Optional, if not provided, {{ CLI_NAME }} init will add a default router and {{ CONFIG_FILE }} to the user's project._
@@ -57,9 +57,9 @@ Additional files can be added beyond the ones listed above. They will be copied
57
57
58
58
## dev.js
59
59
60
-
Called when the user runs `xdn dev`. This entry point is responsible for starting the user's application in development mode. The `{{ PACKAGE_NAME }}/core` library provides a `createDevServer` function to help with this.
60
+
Called when the user runs `{{ CLI_NAME }} dev`. This entry point is responsible for starting the user's application in development mode. The `{{ PACKAGE_NAME }}/core` library provides a `createDevServer` function to help with this.
61
61
62
-
_Optional, if not provided, xdn dev will simply start {{ PRODUCT_NAME }} in local development mode, but will not start a framework application server._
62
+
_Optional, if not provided, {{ CLI_NAME }} dev will simply start {{ PRODUCT_NAME }} in local development mode, but will not start a framework application server._
63
63
64
64
Example:
65
65
@@ -87,9 +87,9 @@ module.exports = function() {
87
87
88
88
## build.js
89
89
90
-
Exports a function that is called when you run `xdn build`. It is responsible for constructing the bundle that is deployed to the {{ PRODUCT_NAME }} cloud. This function typically uses `{{ PACKAGE_NAME }}/core/deploy/DeploymentBuilder` to stage the exploded bundle in the `.xdn` directory.
90
+
Exports a function that is called when you run `{{ CLI_NAME }} build`. It is responsible for constructing the bundle that is deployed to the {{ PRODUCT_NAME }} cloud. This function typically uses `{{ PACKAGE_NAME }}/core/deploy/DeploymentBuilder` to stage the exploded bundle in the `.xdn` directory.
91
91
92
-
_Optional, and not needed in most cases. The xdn build command automatically creates a bundle that includes all static assets referenced in your routes file as well as the `prod` entry point mentioned above._
92
+
_Optional, and not needed in most cases. The {{ CLI_NAME }} build command automatically creates a bundle that includes all static assets referenced in your routes file as well as the `prod` entry point mentioned above._
93
93
94
94
Example:
95
95
@@ -170,7 +170,7 @@ To test your connector locally without publishing it to NPM:
170
170
2. Create an `{{ CONFIG_FILE }}` file in the root directory of your project.
171
171
3. Set the `connector` property to name of the connector package.
172
172
173
-
Now `xdn init`, `xdn dev`, `xdn build`, and `xdn deploy` commands will use the entry points in the connector, and your `prod.js` entrypoint will be used to serve requests in the {{ PRODUCT_NAME }} cloud.
173
+
Now `{{ CLI_NAME }} init`, `{{ CLI_NAME }} dev`, `{{ CLI_NAME }} build`, and `{{ CLI_NAME }} deploy` commands will use the entry points in the connector, and your `prod.js` entrypoint will be used to serve requests in the {{ PRODUCT_NAME }} cloud.
174
174
175
175
## Implementing a connector directly within your project
176
176
@@ -201,4 +201,4 @@ module.exports = {
201
201
}
202
202
```
203
203
204
-
Once the connector is in place, `xdn dev`, `xdn build`, and `xdn deploy` commands will use the entry points in the connector, and your `prod.js` entrypoint will be used to serve requests in the {{ PRODUCT_NAME }} cloud.
204
+
Once the connector is in place, `{{ CLI_NAME }} dev`, `{{ CLI_NAME }} build`, and `{{ CLI_NAME }} deploy` commands will use the entry points in the connector, and your `prod.js` entrypoint will be used to serve requests in the {{ PRODUCT_NAME }} cloud.
0 commit comments