Skip to content

Commit

Permalink
Merge e2167f5 into a0255e6
Browse files Browse the repository at this point in the history
  • Loading branch information
brian-nguyen committed Jun 3, 2018
2 parents a0255e6 + e2167f5 commit 8fc07cc
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 33 deletions.
1 change: 0 additions & 1 deletion .gitattributes

This file was deleted.

16 changes: 12 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,16 @@ bump other players and objects off to stay alive
## Getting Started
Play the latest version [here](http://bumper.ubclaunchpad.com)!

## Development
### Running the server
## Docker Quickstart
Install Docker and the Docker Compose toolset. Then run:
```bash
docker-compose -f docker-compose.dev.yml up
```

## Manual Quickstart
Go and Node are required.

### Server
[dep](https://github.com/golang/dep) is used for handling server dependencies.
```bash
$ cd ./server
Expand All @@ -20,10 +28,10 @@ To add dependencies:
$ dep ensure -add github.com/my/dependency
```

### Running the client
### Client
```bash
$ cd ./client
$ npm install
$ npm start
```
Play at localhost:8080!
Play at localhost:8080!
7 changes: 4 additions & 3 deletions client/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/* eslint-disable */
const webpack = require('webpack');
const MinifyPlugin = require('babel-minify-webpack-plugin');

const config = {
entry: './index.js',
Expand All @@ -26,8 +25,10 @@ const config = {
],
},
plugins: [
new webpack.EnvironmentPlugin(['NODE_ENV']),
new webpack.EnvironmentPlugin([
'NODE_ENV',
]),
]
};

module.exports = env => config;
module.exports = config;
28 changes: 3 additions & 25 deletions client/webpack.prod.js
Original file line number Diff line number Diff line change
@@ -1,29 +1,7 @@
/* eslint-disable */
const webpack = require('webpack');
const MinifyPlugin = require('babel-minify-webpack-plugin');

const config = {
entry: './index.js',
output: {
path: `${__dirname}/public/`,
filename: 'bundle.js',
},
module: {
loaders: [
{
test: /\.jsx?$/,
exclude: '/node_modules/',
loader: 'babel-loader',
query: {
presets: ['es2015', 'react'],
},
},
],
},
plugins: [
new webpack.EnvironmentPlugin(['NODE_ENV']),
new MinifyPlugin(),
]
};
const config = require('./webpack.config');
config.plugins.push(new MinifyPlugin);

module.exports = env => config;
module.exports = config;
19 changes: 19 additions & 0 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
version: '3.4'

services:
client:
build:
context: .
target: client
volumes:
- ./client:/app
command: npm start
ports:
- "8080:8080"
server:
build:
context: .
target: server
command: go run main.go
ports:
- "9090:9090"

0 comments on commit 8fc07cc

Please sign in to comment.