test: change api handler url

This commit is contained in:
AP 2020-04-15 12:20:01 +02:00
parent 3ebbde43c9
commit 21d6b185aa
2 changed files with 3 additions and 2 deletions

View File

@ -14,6 +14,7 @@ module.exports = withBundleAnalyzer({
publicRuntimeConfig: {
nodeEnv: process.env.NODE_ENV || 'development',
apiUrl: `${process.env.BASE_PATH || ''}/api/v1`,
apiBaseUrl: `${process.env.API_BASE_URL || ''}/api/v1`,
basePath: process.env.BASE_PATH || '',
npmVersion: process.env.npm_package_version || '0.0.0',
},

View File

@ -5,7 +5,7 @@ import getConfig from 'next/config';
import Cors from 'micro-cors';
const { publicRuntimeConfig } = getConfig();
const { apiUrl } = publicRuntimeConfig;
const { apiBaseUrl } = publicRuntimeConfig;
const cors = Cors({
origin: true,
@ -19,7 +19,7 @@ const apolloServer = new ApolloServer({
},
});
const handler = apolloServer.createHandler({ path: apiUrl });
const handler = apolloServer.createHandler({ path: apiBaseUrl });
export const config = {
api: {