System Information
- Strapi Version: 4.0.4
- Operating System: Mac OS / Heroku
- Database: Postgres 14
- Node Version: 14.13.1
- NPM Version: 8.3.0
- Yarn Version: 1.22
For learning purposes I am trying to deploy a strapi 4 app (the deliveroo clone project actually) to Heroku. However, this does not work. And it seems there are no updated guides. Currently I follow these guides:
Does anybody know, what changed between strapi v3 and v4 with regard to heroku deployment?
I still create a confi/env/production/
folder with a database.js
and a server.js
file. The database file looks like this:
const parse = require('pg-connection-string').parse;
const config = parse(process.env.DATABASE_URL);
module.exports = ({ env }) => ({
connection: {
client: 'postgres',
connection: {
host: config.host,
port: config.port,
database: config.database,
user: config.user,
password: config.password,
ssl: {
rejectUnauthorized: false
},
},
debug: false,
},
});
and the server.js file lie this:
module.exports = ({ env }) => ({
url: env('https://strapi-deliveroo-clone.herokuapp.com'),
});
The welcome page works, but as soon as I hit the /admin page, an API error occurs.
Has anybody of you been successful?