The opeNode command line interface allows to deploy and manage your sites efficiently.

To deploy your first opeNode site, you first need to get our command line interface, it's simple and easy to get started. It is available on NPM and you can install it via:

npm install -g openode

Then go to your project directory:

cd YOUR_PROJECT_DIRECTORY

Finally, just type:

openode deploy

You will then be prompted for your credentials and project settings. Next, your project will be sent to our cloud environment, and your website will get launched.

Documentation

Please find below the command line readme, also available on https://www.npmjs.com/package/openode.

# openode-cli

## Installation

```
npm install -g openode
```

## Usage

### Deploy an Instance

First, just go to your project directory in command line:

```
cd [your project directory]
```

And then just type:

```
openode deploy
```

This command will upload your local repository to the opeNode cloud, npm install,
then launch a secure container of your server, and then put it online. During this
command, you can also select between using a subdomain.openode.io or a custom domain.

Note that when you run *openode deploy* and your website is already running, it
will update your files, update the environment variables (if they changed), and
reload your website with 0-second-downtime.

### Status

You can obtain the info on your website instance via:

```
openode status
```

### Stopping an Instance

```
openode stop
```

### Restart an Instance

```
openode restart
```

### Erase all content

In order to clear all content of your cloud repository and stop your instance,
the following operation must done:

```
openode erase-all
```

## Custom Domain

To enable a custom domain, make sure to enter your custom domain while running openode deploy.
Then you can manage your custom domain subdomains using the following commands.

### List aliases (subdomains)

```
openode list-aliases
```

### Add an alias (subdomain)

```
openode add-alias [hostname]
```

If your custom domain is for example mycustomdomain.com, then you can run

```
openode add-alias www.mycustomdomain.com
openode add-alias blog.mycustomdomain.com
```

in order to point mycustomdomain.com, www.mycustomdomain.com, and blog.mycustomdomain.com
to this instance.

### Removing an alias (subdomain)

```
openode del-alias [hostname]
```

## Defining storage areas

The storage areas are folders which will never be deleted. Those folders can be
used for storage purpose (database, configurations, etc.).

### List storage areas

```
openode storage-areas
```

### Add a storage area

```
openode add-storage-area [relative-folder]
```

Exemple [relative-folder]: db/

### Delete a storage area

```
openode del-storage-area [relative-folder]
```

Exemple [relative-folder]: db/

## License

ISC

Copyright © openode.io 2017