A quick guide on how to setup Node.js development environment.
Previous versions of these install instructions had been tested with:
| user www-data; | |
| worker_processes auto; | |
| pid /run/nginx.pid; | |
| events { | |
| worker_connections 768; | |
| # multi_accept on; | |
| } |
| # encoding: utf-8 | |
| # Set your full path to application. | |
| app_dir = File.expand_path('../../', __FILE__) | |
| shared_dir = File.expand_path('../../../shared/', __FILE__) | |
| # Set unicorn options | |
| worker_processes 2 | |
| preload_app true | |
| timeout 30 |
| # added all the dependencies | |
| #ex: require "this" or "that" etc | |
| # preset defaults | |
| set :application_name, 'your application name, say like a repo name' | |
| set :domain, 'ip address of the server or domain name' | |
| set :deploy_to, 'to where the app to be installed' | |
| set :repository, 'repo link' | |
| set :branch, 'branch may be staging, qa,production etc' | |
| set :user, 'to which user is deploying the app' |
| require 'mina/git' | |
| require 'mina/bundler' | |
| require 'mina/rails' | |
| require 'mina/unicorn' | |
| require 'mina/rvm' | |
| # preset defaults | |
| set :application_name, 'blog_app' | |
| set :domain, '35.231.73.143' | |
| set :deploy_to, '/home/anoob.bava/blog_app' |
| require 'mina/bundler' | |
| require 'mina/rails' | |
| require 'mina/git' | |
| require 'mina/rvm' | |
| # Usually mina focuses on deploying to one host and the deploy options are therefore simple. | |
| # In our case, there is a number of possible servers to deploy to, it is therefore necessary to | |
| # specify the host that we are targeting. | |
| server = ENV['server'] | |
| # Since the same host can have multiple applications running in parallel, it is necessary to |
| upstream app { | |
| # Path to Unicorn SOCK file, as defined previously | |
| server unix:/home/anoob.bava/blog_app/shared/sockets/unicorn.sock fail_timeout=0; | |
| } | |
| server { | |
| listen 80; |
| #!/usr/bin/env bash | |
| # fork from https://gist.github.com/jakemhiller/d342ad51505addf78ec628a16fd3280f | |
| changed_files="$(git diff-tree -r --name-only --no-commit-id $1 $2)" | |
| check_run() { | |
| echo "$changed_files" | grep --quiet "$1" && eval "$2" | |
| } | |
| check_run package.json "npm prune && npm install" |
A quick guide on how to setup Node.js development environment.
Previous versions of these install instructions had been tested with:
| require 'rails_helper' | |
| RSpec.describe TodosController, :type => :controller do | |
| describe "GET #index" do | |
| #describe "POST #create" do | |
| #describe "GET #show" do | |
| #describe "PATCH #update" do (or PUT #update) | |
| #describe "DELETE #destroy" do | |
| #describe "GET #new" do |