Permalink
Browse files

created heroku app

  • Loading branch information...
PhillipCumber committed Nov 8, 2018
1 parent 2803446 commit 0aad0732b1061134cdb40daccf81c536410038b3
Showing with 15 additions and 15 deletions.
  1. +1 −14 client/src/App.js
  2. +10 −1 package.json
  3. +4 −0 server.js
@@ -6,20 +6,7 @@ class App extends Component {
render() {
return (
<div className="App">
<header className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<p>
Edit <code>src/App.js</code> and save to reload.
</p>
<a
className="App-link"
href="https://reactjs.org"
target="_blank"
rel="noopener noreferrer"
>
Learn React
</a>
</header>
<h1>Hello World</h1>
</div>
);
}
@@ -6,14 +6,23 @@
"scripts": {
"start": "node server.js",
"dev": "concurrently \"nodemon server.js\" \"cd ./client && npm start \" ",
"test": "echo \"Error: no test specified\" && exit 1"
"test": "echo \"Error: no test specified\" && exit 1",
"postinstall": "cd client && npm install && npm run build"

},

"author": "Phillip",
"license": "ISC",
"dependencies": {
"concurrently": "^4.0.1",
"dotenv": "^6.1.0",
"express": "^4.16.4",
"mongoose": "^5.3.10"
},

"engines": {
"node": "10.13.0"
}
}


@@ -5,6 +5,10 @@ let app = express()
app.use(express.urlencoded({ extended: true }));
app.use(express.json());
// app.use('/', routes)
app.use(express.static(__dirname + '/client/build/'));
app.get('/', (req,res) => {
res.sendFile(__dirname + '/client/build/index.html')
})

const PORT = process.env.PORT || 3001
app.listen(PORT, () => {

0 comments on commit 0aad073

Please sign in to comment.