Reputation: 1
i have to use this code in my app in nuxt.config.ts:
runtimeConfig: {
public: {
path: process.env.PATH || "",
},
},
routeRules: {
'/api/**': {
proxy: { to: `${process.env.PATH}/api/**` },
},
},
But path ${process.env.PATH}/api/**
can't be changed if i apply docker-compose environment:
services:
app:
image: app:v0.1
container_name: "app"
ports:
- 3000:3000
environment:
PATH: http://localhost:3000
How to do that?
I wanted to use useRuntimeConfig(), but it can't be applied in nuxt.config.ts
Upvotes: 0
Views: 15