Code Monkey home page Code Monkey logo

haikro's Introduction

haikro Build Status

A tool to make + deploy node apps as self contained tarballs to Heroku. Read the explainer on my blog.

Installation

npm install --save haikro

I currently recommend installing haikro as a devDependency and you need not run npm prune --production as Haikro will effectively do this internally.

Usage

Example Makefile:-

app := my-deplorable-app

deploy:
	# Clean+install dependencies
	git clean -fxd
	npm install

	# Build steps
	sass styles.scss public/styles.css
	
	# Package+deploy
	@haikro build deploy \
		--app $(app) \
		--heroku-token $(HEROKU_AUTH_TOKEN) \
		--commit `git rev-parse HEAD`

Where HEROKU_AUTH_TOKEN is:

heroku auth:token

Example Procfile:-

web: server/app.js

Example .travis.yml

script:
- npm test
language: node_js
node_js:
- '0.10'
after_success:
- test $TRAVIS_PULL_REQUEST == "false" && test $TRAVIS_BRANCH == "master" && make deploy

Example of package.json

{
  "name": "My app",
  "version": "1.0.0",
  "engines": {
    "node": "0.10.x"
  }
}

Note: Haikro is also tested with codeship.io.

If you want to use iojs just change your package.json's engines to:-

{
  "name": "My app",
  "version": "1.0.0",
  "engines": {
    "iojs": "^1.0.3"
  }
}

CLI Options

  • --app - Heroku app name
  • --region - Which region to create app in (when used with haikro create)
  • --organization - Which organization to create app in (when used with haikro create)
  • --commit - free text used to identify a release
  • --heroku-token - Heroku auth token
  • --silent - displays no debug info
  • --verbose - displays lot of debug info

Licence

This software is published by the Financial Times under the MIT licence.

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.