System Information
- Strapi Version: 3.6.8 Community Version
- Operating System: Ubuntu 20.04.2 LTS (Running on gitpod)
- Database: MonogDB Atlas
- Node Version: 14.17.6
- NPM Version: 6.14.15
I’m trying to run strapi in admin development mode using the --watch-admin
flag. I ran into a few errors previously, most notably one where the admin URL was trying to make connections to localhost which would not work because I’m working form gitpod.io(remote development server with code editor) and gitpod creates a URL to enable me access the project. I resolved this by making a few changes to the following files.
admin.config.js - I added this to the /admin folder with the following code
module.exports = {
webpack: (config, webpack) => {
config.devServer = {
host: '0.0.0.0',
public: 'https://8000-coral-cod-ux5x4zwf.ws-eu17.gitpod.io',
disableHostCheck: true,
};
return config;
},
};
server.config.js
module.exports = ({ env }) => ({
host: env('HOST', '0.0.0.0'),
url: 'https://8000-coral-cod-ux5x4zwf.ws-eu17.gitpod.io',
port: env.int('PORT', 1337),
admin: {
url: 'https://8000-coral-cod-ux5x4zwf.ws-eu17.gitpod.io/admin',
auth: {
secret: env('ADMIN_JWT_SECRET', '2f632e44cc9b1a8eaca611b2337b47a6'),
},
},
});
https://8000-coral-cod-ux5x4zwf.ws-eu17.gitpod.io is the URL gitpod provides me to access localhost:8000
When I run --watch-admin
two ports are opened 1337 and 8000. Now gitpod assigns two separate URLs to them like the URL above. Trying to access the URL above has me stuck on an infinitely loading screen. I check the console and there are no errors.
I’m not even sure where to go from here. I’ve been at this for days and with no error messages displaying on both the terminal and console, I’m not sure what’s going wrong.