Giter Club home page Giter Club logo

node-deploy's Introduction

Node Deploy

Node Deploy is a app deployment solution that allows you to easily update and execute remote Node.js applications on your remote server using a CLI.


Project Setup

You will need Node.js. For Windows and Mac, you can use the installer. For Linux distributions, follow these simple instructions. Now...

cd into the project directory, and run:

npm install

This will install all dependencies for client and server.

Installation

You should add /bin/nodedeploy and /bin/nodedeploy-server to your PATH so you can use them anywhere without having to reference the whole path. Node Deploy will interact with Git so you should be within project folders while you use it.


Server Usage

cd into the project directory, and run:

nodedeploy-server [port]

This will start the HTTP server that receives client connections. You can specify an optional listen port as an argument; this defaults to 3333.

If you get a permission denied error, you need to add executable permission first:

chmod +x nodedeploy-server

Then try again.


Client Usage

To see the help menu, run nodedeploy without any parameters or pass the --help argument.

nodedeploy --help

Remote Setup

nodedeploy setup

This will start the menu flow, which will prompt for everything it needs from you:

  • host: The IP address or host name of the server running Node Deploy.
  • port: The port in which the server is listening on.
  • username: The username which should be used for login.
  • password: The password which should be used for login.
  • projects folder: The folder on the server that projects should be saved in. Defaults to the remote home directory.
  • token lifespan: The lifespan in minutes of authentication tokens, defaults to 60 minutes (an hour). This is how often you will have to re-enter your username and password.

This process can only be done once, unless you delete the settings.json file from the server later.


Project Creation

nodedeploy create --id [project-id] --remote [remote-uri] --branch [git-branch]
  • [--id/-i]: An identifier for your project, cannot have spaces, or a few other special characters (which you will find out as you try it out).
  • [--remote/-r]: A remote Git repo SSH URL, used to download the project on the remote server.
  • [--branch/-b]: (Optional) Changes the branch that's cloned to the server.

This will clone the project onto the remote server.


Project Listing

nodedeploy list

This will retrieve a simple list of project IDs that exist on the server.


Project Updating

nodedeploy update [project-id] --message [commit-msg] --branch [git-branch]
  • [project-id]: The identifier of the project to update.
  • [--message/-m]: The commit message used to commit local changes to Git before contacting the server.
  • [--branch/-b]: (Optional) The branch that is used to pull changes on the remote server. Defaults to master.

This will commit and push local changes to Git, then pull them into the project on the remote server.


Project Starting

nodedeploy start [project-id]
  • [project-id]: The identifier of the project to start.

This will execute the runner (nodedeploy-server or app.js) on the remote server for this project. Output will be logged into the project directory.


Project Deploying

nodedeploy deploy [project-id] --message [commit-msg] --branch [git-branch]
  • [project-id]: The identifier of the project to deploy.
  • [--message/-m]: The commit message used to commit local changes to Git before contacting the server.
  • [--branch/-b]: (Optional) The branch that is used to pull changes on the remote server. Defaults to master.

This is a combination of update and start; changes will be pulled and it will be executed.


Project Stopping

nodedeploy stop [project-id]
  • [project-id]: The identifier of the project to stop.

This will kill a started instance of the project.


Project Destruction

nodedeploy destroy [project-id]
  • [project-id]: The identifier of the project to destroy.

This will destroy (delete) the project folder on the remote server.

node-deploy's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.