mirror of
https://github.com/twentyhq/twenty.git
synced 2024-12-23 12:02:10 +03:00
7943141d03
## Summary Add support for multi-workspace feature and adjust configurations and states accordingly. - Introduced new state isMultiWorkspaceEnabledState. - Updated ClientConfigProviderEffect component to handle multi-workspace. - Modified GraphQL schema and queries to include multi-workspace related configurations. - Adjusted server environment variables and their respective documentation to support multi-workspace toggle. - Updated server-side logic to handle new multi-workspace configurations and conditions.
22 lines
654 B
TypeScript
22 lines
654 B
TypeScript
import * as fs from 'fs';
|
|
import path from 'path';
|
|
|
|
export const envVariables = (variables: string) => {
|
|
let payload = `
|
|
PG_DATABASE_URL=postgres://postgres:postgres@localhost:5432/default
|
|
ACCESS_TOKEN_SECRET=replace_me_with_a_random_string_access
|
|
LOGIN_TOKEN_SECRET=replace_me_with_a_random_string_login
|
|
REFRESH_TOKEN_SECRET=replace_me_with_a_random_string_refresh
|
|
FILE_TOKEN_SECRET=replace_me_with_a_random_string_refresh
|
|
REDIS_URL=redis://localhost:6379
|
|
`;
|
|
payload = payload.concat(variables);
|
|
fs.writeFile(
|
|
path.join(__dirname, '..', '..', 'twenty-server', '.env'),
|
|
payload,
|
|
(err) => {
|
|
throw err;
|
|
},
|
|
);
|
|
};
|