Skip to content

Commit

Permalink
Debugging deploy things
Browse files Browse the repository at this point in the history
  • Loading branch information
l3zero committed Jun 21, 2020
1 parent 41ae541 commit f82819f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Procfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
web: npm start
web: npm run start
2 changes: 1 addition & 1 deletion client/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<head>
<meta http-equiv="Content-Security-Policy"
content="default-src 'self'; manifest-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline' https://fonts.gstatic.com/ https://fonts.googleapis.com/; img-src 'self' 'https://slide-news.herokuapp.com/'; font-src 'self' https://fonts.gstatic.com/ https://fonts.googleapis.com/;" />
content="manifest-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline' https://fonts.gstatic.com/ https://fonts.googleapis.com/; font-src 'self' https://fonts.gstatic.com/ https://fonts.googleapis.com/;" />
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
},
"scripts": {
"start": "node server.js",
"heroku-postbuild": "cd client && npm run build && npm run postBuild",
"db": "sudo systemctl start mongod",
"test": "echo \"Error: no test specified\"",
"dev": "concurrently \"npm run db && npm run start\" \"cd client && npm start\"",
Expand Down
6 changes: 3 additions & 3 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ app.use(bodyParser.json())
// })
app.use('/mynews', newsRouter)

app.use(express.static(path.join(__dirname, './client/build')))
app.get('/*', function (req, res) {
res.sendFile(path.join(__dirname, './client/build', 'index.html'))
app.use(express.static(path.join(__dirname, 'build')))
app.get('*', function (req, res) {
res.sendFile(path.join(__dirname, 'build', 'index.html'))
})
//Dev
// const port = process.env.PORT || '9000'
Expand Down

0 comments on commit f82819f

Please sign in to comment.