fix: fix application name

This commit is contained in:
Khaled Garbaya
2017-11-07 11:49:31 +01:00
committed by Benedikt Rötsch
parent cf953aa3ad
commit 85d5e0faed

View File

@@ -15,6 +15,7 @@ let previewClient = null
module.exports.initClients = (options) => {
// Getting the app version
const { version } = require('../package.json')
const applicationName = `the-example-app.nodejs/${version}`
const config = options || {
spaceId: process.env.CF_SPACE_ID,
@@ -22,12 +23,12 @@ module.exports.initClients = (options) => {
previewToken: process.env.CF_PREVIEW_TOKEN
}
deliveryClient = createClient({
application: `the-example-app.node/${version}`,
application: applicationName,
space: config.spaceId,
accessToken: config.deliveryToken
})
previewClient = createClient({
application: `the-example-app.node/${version}`,
application: applicationName,
space: config.spaceId,
accessToken: config.previewToken,
host: 'preview.contentful.com'