silverwolf-x's picture
download
raw
675 Bytes
const spaceImport = require("contentful-import");
const exportFile = require("./export.json");
const { CONTENTFUL_SPACE_ID, CONTENTFUL_MANAGEMENT_TOKEN } = process.env;
if (!CONTENTFUL_SPACE_ID || !CONTENTFUL_MANAGEMENT_TOKEN) {
throw new Error(
[
"Parameters missing...",
"Please run the setup command as follows",
"CONTENTFUL_SPACE_ID=XXX CONTENTFUL_MANAGEMENT_TOKEN=CFPAT-XXX npm run setup",
].join("\n"),
);
}
spaceImport({
spaceId: CONTENTFUL_SPACE_ID,
managementToken: CONTENTFUL_MANAGEMENT_TOKEN,
content: exportFile,
})
.then(() => console.log("The content model of your space is set up!"))
.catch((e) => console.error(e));

Xet Storage Details

Size:
675 Bytes
·
Xet hash:
0bef07ad3757d8231397d807e574df7a872f734fcd23d01655677d569387afe2

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.