Skip to content
This repository was archived by the owner on Jan 6, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM node:latest

MAINTAINER myenigmamachine <myenigmamachine@gmail.com>

COPY . /src
WORKDIR /src

RUN npm install
RUN npm run build

EXPOSE 8080

CMD npm run start
File renamed without changes.
4 changes: 4 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
web:
build: .
ports:
- "8080:8080"
10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,22 @@
"author": "",
"devDependencies": {
"babel-core": "^6.2.1",
"babel-loader": "^6.2.0",
"babel-loader": "^6.2.4",
"babel-preset-es2015": "^6.1.18",
"babel-preset-stage-1": "^6.1.18",
"css-loader": "^0.23.1",
"eslint": "^2.6.0",
"eslint-config-airbnb": "^6.2.0",
"eslint-plugin-react": "^4.2.3",
"style-loader": "^0.13.0",
"webpack": "^1.12.9",
"webpack-dev-server": "^1.14.0"
"html-webpack-plugin": "^2.15.0",
"webpack": "^1.12.14",
"webpack-dev-server": "^1.14.1"
},
"dependencies": {
"altspace": "^0.6.0",
"three": "^0.73.0",
"pleasejs": "^0.4.2"
"pleasejs": "^0.4.2",
"express": "^4.13.4"
}
}
38 changes: 38 additions & 0 deletions server.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
// Copyright 2015-2016, Google, Inc.
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

'use strict';

var express = require('express');

var app = express();

// Setup view engine
app.set('view engine', 'jade');

app.use(express.static(__dirname + '/dist'));

app.get('/', function(req, res) {
res.render('index');
});

var server = app.listen(
process.env.PORT || 8080,
'0.0.0.0',
function () {
var address = server.address().address;
var port = server.address().port;
console.log('App listening at http://%s:%s', address, port);
console.log('Press Ctrl+C to quit.');
}
);
18 changes: 13 additions & 5 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,24 @@
var HtmlWebpackPlugin = require('html-webpack-plugin');
var HTMLWebpackPluginConfig = new HtmlWebpackPlugin({
template: 'index.html',
filename: 'index.html',
inject: 'body'
});

module.exports = {
entry: [
'./src/index.js'
'./app/index.js'
],
output: {
path: __dirname,
publicPath: '/',
filename: 'bundle.js'
publicPath: '/dist',
filename: 'index_bundle.js'
},
module: {
loaders: [{
test: /\.jsx?$/,
exclude: /node_modules/,
loaders: ['babel']
loaders: ['babel-loader']
}, {
test: /\.css$/,
loader: 'style!css'
Expand All @@ -23,5 +30,6 @@ module.exports = {
devServer: {
historyApiFallback: true,
contentBase: './'
}
},
plugins: [HTMLWebpackPluginConfig]
}