Skip to content

Commit

Permalink
Fixed tests and added Dockerfile.
Browse files Browse the repository at this point in the history
  • Loading branch information
staminna committed Jul 18, 2019
1 parent c21c2af commit 16a91cc
Show file tree
Hide file tree
Showing 8 changed files with 65 additions and 9 deletions.
20 changes: 20 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# base image
FROM node:8.4

# set working directory
WORKDIR /Users/jorgenunes/webdev/modos

# install and cache app dependencies
COPY package*.json ./
ADD package.json /usr/src/app/package.json
RUN npm install
RUN npm install [email protected] -g

# bundle app source
COPY . .

EXPOSE 3000

# start app
CMD ["npm", "start"]

2 changes: 2 additions & 0 deletions go.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
forever -e error_logs.log start start.js
24 changes: 24 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"@typescript-eslint/typescript-estree": "^1.11.0",
"browserslist": "^4.6.3",
"eslint": "^5.16.0",
"path": "^0.12.7",
"react": "^16.8.6",
"react-dom": "^16.8.6",
"react-router-dom": "^4.2.2",
Expand Down
10 changes: 5 additions & 5 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ import Slider from "react-slick";
import { HashRouter} from "react-router-dom";

import './App.css';
import './index.js'
// import './index.js'

export default class Responsive extends Component {
class App extends Component {
constructor() {
super()
this.state={
showMe:false,
hideMe: true
showMe:false,
hideMe: true
}
}
operation()
Expand Down Expand Up @@ -61,7 +61,6 @@ export default class Responsive extends Component {
return (
<div className="group">
<div className="left">
{/* <h2> Modo(s). </h2> */}
<Slider {...settings}>
<div>
<img alt="detalhe loja" className="fotos" src="fotos/1_detalhe_loja.jpg"/>
Expand Down Expand Up @@ -110,3 +109,4 @@ export default class Responsive extends Component {
}
}

export default App;
3 changes: 0 additions & 3 deletions src/Contact.js

This file was deleted.

2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import * as serviceWorker from './serviceWorker';
import App from "./App";

ReactDOM.render(<App />, document.getElementById('root'));

Expand Down
12 changes: 12 additions & 0 deletions start.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
const express = require('express');
const path = require('path');
const app = express();

app.use(express.static(path.join(__dirname, 'build')));

app.get('/', function(req, res) {
res.sendFile(path.join(__dirname, 'build', 'index.html'));
});

console.log("Listening for Modos on port 80!");
app.listen(80);

0 comments on commit 16a91cc

Please sign in to comment.