You may want to read this post, Using a prefix for strapi routes.
The point is to isolate the routes, administration route vs production route (access for regular users). This can be done by customizing the server.js
config file something like this:
// modified server config
module.exports = ({ env }) => ({
host: env('HOST', '0.0.0.0'),
port: env.int('PORT', 1337),
url: "https://prod.domain.com/api",
admin: {
url: "https://dev.domain.com/api",
auth: {
secret: env('ADMIN_JWT_SECRET', 'replaced'),
},
},
});
Then you need to start both dev
and prod
instances with pm2
.