Skip to content
This repository has been archived by the owner on Jun 10, 2019. It is now read-only.

Commit

Permalink
Adds backend target to easily run an instance of the backend. Fixes #174
Browse files Browse the repository at this point in the history
  • Loading branch information
RickR authored and alexspence committed Jun 21, 2017
1 parent 45368b7 commit cd95401
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -229,4 +229,6 @@ yarn-error.log*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
!.vscode/extensions.json

/backend/*
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,7 @@ publish: build

travis: build test

.PHONY: backend
backend:
bin/run_backend.sh

1 change: 1 addition & 0 deletions backend
Submodule backend added at 3cd7f0
17 changes: 17 additions & 0 deletions bin/run_backend.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env bash

set +exu

function get_base_path(){
cd $(dirname $0) && cd .. && pwd
}

BASE_DIR="$(get_base_path)"
BACKEND_DIR="${BASE_DIR}/backend"
BACKEND_REPO='https://github.com/OperationCode/operationcode_backend.git'

echo "Cloning backend repo into $BACKEND_DIR"
git clone $BACKEND_REPO $BACKEND_DIR

echo "Starting backend"
cd $BACKEND_DIR && make build && make db_create && make db_migrate && make run

0 comments on commit cd95401

Please sign in to comment.