mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
Make server take into account GRIST_SERVERS (#659)
Also ensure that only a home server will setup the database. resolves #654 Co-authored-by: Florent FAYOLLE <florent.fayolle@beta.gouv.fr>
This commit is contained in:
@@ -15,7 +15,7 @@ export type ServerType = "home" | "docs" | "static" | "app";
|
||||
const allServerTypes: ServerType[] = ["home", "docs", "static", "app"];
|
||||
|
||||
// Parse a comma-separate list of server types into an array, with validation.
|
||||
function parseServerTypes(serverTypes: string|undefined): ServerType[] {
|
||||
export function parseServerTypes(serverTypes: string|undefined): ServerType[] {
|
||||
// Split and filter out empty strings (including the one we get when splitting "").
|
||||
const types = (serverTypes || "").trim().split(',').filter(part => Boolean(part));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user