Merged PR 8: merge

master
Tudor Stanciu 2020-05-11 05:01:40 +03:00
commit 4dbe90aa02
6 changed files with 622 additions and 325 deletions

5
.env
View File

@ -1,3 +1,2 @@
PUBLIC_URL=http://*/play-nine
PORT=3006
REACT_APP_TEST_KEY = '!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!'
PUBLIC_URL=/play-nine/
PORT=3006

23
dockerfile Normal file
View File

@ -0,0 +1,23 @@
# build environment
FROM node:12 as builder
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . ./
RUN npm run build
# production environment
FROM node:12
RUN printf '\n\n- Copy application files\n'
ARG APP_SUBFOLDER=play-nine
COPY --from=builder /app/build ./application/${APP_SUBFOLDER}
COPY --from=builder /app/build/index.html ./application/
RUN npm install -g serve@11.3.0
EXPOSE 80
CMD ["sh","-c","serve -s application -p 80"]

871
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -3,17 +3,17 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@fortawesome/fontawesome-svg-core": "^1.2.12",
"@fortawesome/free-solid-svg-icons": "^5.6.3",
"@fortawesome/react-fontawesome": "^0.1.4",
"bootstrap": "^4.2.1",
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.5.0",
"@testing-library/user-event": "^7.2.1",
"bootstrap": "^4.3.1",
"font-awesome": "^4.7.0",
"lodash": "^4.17.15",
"react": "^16.7.0",
"react-dom": "^16.7.0",
"react-fontawesome": "^1.6.1",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-fontawesome": "^1.7.1",
"react-router-dom": "^5.0.1",
"react-scripts": "^3.1.1"
"react-scripts": "3.4.1"
},
"scripts": {
"start": "react-scripts start",
@ -24,10 +24,16 @@
"eslintConfig": {
"extends": "react-app"
},
"browserslist": [
">0.2%",
"not dead",
"not ie <= 11",
"not op_mini all"
]
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}

View File

@ -1,12 +1,17 @@
import React from "react";
import Game from "./game";
import PageNotFound from "./PageNotFound";
import { Route, Switch } from "react-router-dom";
class App extends React.Component {
state = {};
render() {
return (
return (
<div>
<Game />
<Switch>
<Route exact path="/" component={Game} />
<Route component={PageNotFound} />
</Switch>
</div>
);
}

View File

@ -0,0 +1,5 @@
import React from "react";
const PageNotFound = () => <h1>Oops! Page not found</h1>;
export default PageNotFound;