init commit,
This commit is contained in:
24
03_source/cms_backend/prisma/seeds/global-config.ts
Normal file
24
03_source/cms_backend/prisma/seeds/global-config.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
import packageJson from '../../package.json';
|
||||
|
||||
type ConfigType = {
|
||||
basePath?: string;
|
||||
appVersion: string;
|
||||
cors: {
|
||||
allowedOrigins: string[];
|
||||
methods: string[];
|
||||
};
|
||||
};
|
||||
|
||||
export const CONFIG: ConfigType = {
|
||||
appVersion: packageJson.version,
|
||||
basePath:
|
||||
process.env.NODE_ENV === 'production' ? process.env.PRODUCTION_API : process.env.DEV_API,
|
||||
cors: {
|
||||
/**
|
||||
* [] = allow all origins
|
||||
* ['http://localhost:8081', 'http://localhost:8082'] = allow only these origins
|
||||
*/
|
||||
allowedOrigins: [],
|
||||
methods: ['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'OPTIONS']
|
||||
}
|
||||
};
|
Reference in New Issue
Block a user