Skip to content

Commit

Permalink
Merge pull request #1 from franciclo/master
Browse files Browse the repository at this point in the history
Fix now deploy and some bugs
  • Loading branch information
florlafuente authored Jan 9, 2018
2 parents 9d6c727 + d4f2613 commit d357930
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion components/Table.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default class extends React.Component {
}
}

componentWillMount () {
componentDidMount () {
fetch('api/cats')
.then( r => r.json() )
.then( data => {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"scripts": {
"dev": "next",
"build": "next build && next export",
"start": "node server.js"
"start": "NODE_ENV=production node server.js"
},
"author": "flor",
"license": "ISC",
Expand Down
2 changes: 1 addition & 1 deletion server.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ let config = require('config')

//db connection

var db = mongoose.connect('mongodb://sarasa:sarasa123@ds135547.mlab.com:35547/cats', (error) => {
var db = mongoose.connect('mongodb://sarasa:sarasa123@ds135547.mlab.com:35547/cats', (err) => {
if(err) throw err
console.log("connection successful")
})
Expand Down

0 comments on commit d357930

Please sign in to comment.