0
Knexfile code:
module.exports = {
development: {
client: 'sqlite3',
connection: {
filename: './src/database/db.sqlite'
},
migrations:{
directory: './src/database/migrations'
},
useNullAsDefault:true,
},
production: {
client:'pg',
connection:process.env.DATABASE_URL,
migrations:{
directory: __dirname +'/src/database/migrations'
},
useNullAsDefault:true
},
};
{
"name": "backend",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"dev": "nodemon src/index.js",
"start": "set NODE_ENV= production node src/index.js"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"celebrate": "^12.2.0",
"cors": "^2.8.5",
"dotenv": "^8.2.0",
"express": "^4.17.1",
"knex": "^0.20.13",
"leaflet": "^1.7.1",
"multer": "^1.4.2",
"nodemailer": "^6.4.11",
"nodemailer-smtp-transport": "^2.7.4",
"nodemon": "^2.0.2",
"pg": "^8.5.1",
"react-leaflet": "^2.7.0",
"sqlite3": "^4.1.1"
}
}
I think the error may be related to your start script, maybe this environment-veritable set in Heroku doesn’t work properly. I think the ideal would be to leave only Node src/index.js there
– Rafael Costa