Quering the database on Heroku

I have this:

const knex = require('knex')({
      client: 'sqlite3',
      connection: {
        filename: 'https://polar-river-07796.herokuapp.com/data/storage/core.sqlite'
      },
      useNullAsDefault: false
    });

But when I upload to Heroku it aint working. On local machine its working as:

const knex = require('knex')({
      client: 'sqlite3',
      connection: {
        filename: '/data/storage/core.sqlite'
      },
      useNullAsDefault: false

I have changed database to Postregsql on Heroku. Where am i going wrong?

hi can you help me with the steps of of running botpress in your local postgresql. i have written my .env file. but how do i use it. which file to change???

@DigiSenseiZim Well you said that you change the database to Postgres on Heroku and your using a 'sqlite3' client. Change you client option to 'pg' and you should be fine.

1 Like

Just paste your .env file next to your botpress binary and you’ll be fine

1 Like

Totally dumb of me. :see_no_evil: Let me try that

@EFF That solved the issue on bp1216 but on 12.2 I am back to figuring out what the problem is.

is this another issue ? did you change your environment variables ?