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

Commit cd95401

Browse files
RickRalexspence
authored andcommitted
Adds backend target to easily run an instance of the backend. Fixes #174
1 parent 45368b7 commit cd95401

File tree

4 files changed

+25
-1
lines changed

4 files changed

+25
-1
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,4 +229,6 @@ yarn-error.log*
229229
!.vscode/settings.json
230230
!.vscode/tasks.json
231231
!.vscode/launch.json
232-
!.vscode/extensions.json
232+
!.vscode/extensions.json
233+
234+
/backend/*

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,7 @@ publish: build
1313

1414
travis: build test
1515

16+
.PHONY: backend
17+
backend:
18+
bin/run_backend.sh
19+

backend

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Subproject commit 3cd7f04d26fed22f518db421e8b357c56a881b2c

bin/run_backend.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/usr/bin/env bash
2+
3+
set +exu
4+
5+
function get_base_path(){
6+
cd $(dirname $0) && cd .. && pwd
7+
}
8+
9+
BASE_DIR="$(get_base_path)"
10+
BACKEND_DIR="${BASE_DIR}/backend"
11+
BACKEND_REPO='https://github.com/OperationCode/operationcode_backend.git'
12+
13+
echo "Cloning backend repo into $BACKEND_DIR"
14+
git clone $BACKEND_REPO $BACKEND_DIR
15+
16+
echo "Starting backend"
17+
cd $BACKEND_DIR && make build && make db_create && make db_migrate && make run

0 commit comments

Comments
 (0)