This guide shows you everything you can do with the XDN command line interface.
To install the XDN CLI run
npm i -g @xdn/cli
Or with yarn:
yarn global add @xdn/cli
Creates a build of your app optimized for production
|Skips the framework (Next.js, Vue, Angular, etc..) build and simply rebundles your router|
Clears the cache. If neither
--surrogate-key is specified, the entire cache for the
specified environment will be cleared.
|(Required) The team name|
|(Required) The site name.|
|(Required) The environment name.|
|A path to clear. Use "*" as a wildcard.|
|Clears all responses assigned to the specified surrogate key.|
xdn cache-clear --team=my-team --site=my-site --environment=production --path=/p/*
Creates a script that provides autocompletion for xdn cli commands that can be installed in your shell.
xdn completion >> ~/.zshrc
xdn completion >> ~/.bashrc
Builds and deploys your site on the Moovweb XDN.
|The name of the team under which the site will be deployed. The site will be deployed to your private space will be used if omitted.|
|The name of the site to deploy. By default the |
|The environment to deploy to. By default the |
|The name of the source control branch. This is automatically set when using Git.|
|Skips the build step|
|Authenticates using a deploy token rather than your user credentials. Use this option when deploying from CI.|
|The URL at which the commit can be viewed in your source control provided. If your package.json provides the repository attribute the commit URL will be derived automatically if you use GitHub, GitLab, or BitBucket.|
xdn deploy my-team --environment=production
Open the XDN documentation in your browser.
Run in an existing app to add all required packages and files need to publish your app on the Moovweb XDN
Logs into the XDN via the developer console.
Logs out of the XDN
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.
|Runs your app using serverless-offline to more closely simulate the cloud environment. This is equivalend to setting NODE_ENV environment variable to |
|Enables caching during local development. By default caching is turned off in local development to ensure you don't see stale responses as you make changes to your code. Enable caching to test the caching logic in your router.|
xdn run --production
Switches the version of all @xdn/* packages in your project.
To install a particular version:
xdn use 1.45.0
To install the latest stable:
xdn use latest
To install the latest preview:
xdn use next