System Information
- Strapi Version: 3.6.0
- Operating System:
- Database:
- Node Version:
- NPM Version:
- Yarn Version:
I feel a little stupid…
After many tries, I can’t restore any working setup for my local dev, and I was not able to retrieve this basic information from the documentation.
server.js
module.exports = ({ env }) => ({
host: env('HOST', '0.0.0.0'),
port: env.int('PORT', 1337),
url: env('PUBLIC_URL', 'https://api.example.com'),
admin: {
auth: {
secret: env('ADMIN_JWT_SECRET', '____'),
},
},
});
and .env
:
HOST=0.0.0.0
PORT=1337
PUBLIC_URL=http://localhost:1337
With this setup, the API is available, but the admin does not load:
http://localhost:1337/admin will present a loading circle, as the debug panel indicates that connection is refused to http://localhost/admin/init.
Obviously, although the endpoint is reachable, port is missing within the relative links…
Without the forced port in the public_url, the port won’t be added to the url…