Skip to content

Commit

Permalink
Add Makefile shortcuts
Browse files Browse the repository at this point in the history
Shortcuts created for dependencies, docker-compose start, and standalone starts for the client and server.
README updated accordingly.
  • Loading branch information
bobheadxi committed Jun 4, 2018
1 parent 1caff6e commit 39d3e15
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 13 deletions.
21 changes: 21 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Installs project dependencies
.PHONY: deps
deps:
go get github.com/codegangsta/gin
(cd server ; go get -u github.com/golang/dep/cmd/dep ; dep ensure)
(cd client ; npm install )

# Starts both the server and the client via docker-compose
.PHONY: docker-start
docker-start:
docker-compose -f docker-compose.dev.yml up

# Starts the client
.PHONY: client
client:
(cd ./client ; npm start)

# Starts the server
.PHONY: server
server:
(cd ./server ; PORT=9090 ; go run main.go)
31 changes: 18 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,30 +8,35 @@ Play the latest version [here](http://bumper.ubclaunchpad.com)!

## Docker Quickstart
Install Docker and the Docker Compose toolset. Then run:

```bash
docker-compose -f docker-compose.dev.yml up
make docker-start
```

## Manual Quickstart
Go and Node are required.

### Server
[dep](https://github.com/golang/dep) is used for handling server dependencies.
Go and Node are required. To install the required dependencies:

```bash
$ make deps
```

### Run the Server

```bash
$ cd ./server
$ go get -u github.com/golang/dep/cmd/dep
$ dep ensure
$ go run main.go
$ make server
```

To add dependencies:

```bash
$ dep ensure -add github.com/my/dependency
```

### Client
### Start the Client

```bash
$ cd ./client
$ npm install
$ npm start
$ make clinet
```
Play at localhost:8080!

Play at localhost:8080!

0 comments on commit 39d3e15

Please sign in to comment.