ec2-deploy
Easily Deploy files to an AWS EC2 instance.
Last updated a year ago by mezaria .
ISC · Original npm · Tarball · package.json
$ cnpm install ec2-deploy 
SYNC missed versions from official npm registry.

EC2-Deploy

This EC2-Deploy package makes it super easy to upload files to your AWS EC2 instance (or any SSH instance - only tested via AWS EC2). This package can accept a couple of simple commands which will then watch your directory and automatically send the files to the desired location on your server.

I created this as an easy way to deploy an API to EC2 as I wrote it, I couldn't see anything similar so here we are...

Features:

  • Checks that the user set in setConfig() is authorised to create/edit files in the chosen remote directory.
  • Clears chosen remote directory of files and upload files from your local directory on start so there are no differences between live and local (Optional).
  • Uploads file on creation or change.
  • Creates directories on the server on local creation.
  • Deletes files/directories from server when deleted locally.

Installation

Package on NPM

$ npm install ec2-deploy

Usage

const deployer = require('ec2-deploy');

deployer.setConfig({
	host: 'my.server.ip.address', //IP Address of your server (IPv4 on EC2)
	username: 'my-user-name',
	password: 'top-secret-password',
	remotePath: '../../var/www/html' //The path from your user's root directory
                                     //where you want the files to go on the server
});

deployer.autoDeploy('api/', true);
//1st Param: local directory of where you want the deployer to watch and upload files from
//2nd Param: Set true if you want to refresh your server files when you run autoDeploy (Recommended)

Run this to auto deploy as you save changes (or add it to a package.json script):

$ node <FILE-WITH-CODE-ABOVE>.js

If you encounter an error report it here

Extra Details if you're using this to host a LAMP server with EC2:
  1. INSTALL LAMP ON EC2 LINUX 2
  2. Create a user/password login for EC2 Instance
  3. Set User Permissions
  4. If you need to edit the .htaccess then you need to edit the httpd.conf
  5. Use this package and get coding!

Current Tags

  • 2.2.1                                ...           latest (a year ago)

36 Versions

  • 2.2.1                                ...           a year ago
  • 2.2.0                                ...           a year ago
  • 2.1.3                                ...           a year ago
  • 2.1.2                                ...           a year ago
  • 2.1.1                                ...           a year ago
  • 2.1.0                                ...           a year ago
  • 2.0.3                                ...           a year ago
  • 2.0.2                                ...           a year ago
  • 2.0.1                                ...           a year ago
  • 2.0.0                                ...           a year ago
  • 1.3.11                                ...           a year ago
  • 1.3.10                                ...           a year ago
  • 1.3.9                                ...           a year ago
  • 1.3.8                                ...           a year ago
  • 1.3.7                                ...           a year ago
  • 1.3.6                                ...           a year ago
  • 1.3.5                                ...           a year ago
  • 1.3.4                                ...           a year ago
  • 1.3.3                                ...           a year ago
  • 1.3.2                                ...           a year ago
  • 1.3.1                                ...           a year ago
  • 1.3.0                                ...           a year ago
  • 1.2.8                                ...           a year ago
  • 1.2.7                                ...           a year ago
  • 1.2.6                                ...           a year ago
  • 1.2.5                                ...           a year ago
  • 1.2.4                                ...           a year ago
  • 1.2.3                                ...           a year ago
  • 1.2.2                                ...           a year ago
  • 1.2.1                                ...           a year ago
  • 1.2.0                                ...           a year ago
  • 1.1.3                                ...           a year ago
  • 1.1.2                                ...           a year ago
  • 1.1.1                                ...           a year ago
  • 1.1.0                                ...           a year ago
  • 1.0.0                                ...           a year ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (4)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |