We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 687a962 + ff904e2 commit d2596c7Copy full SHA for d2596c7
src/components/Edit.js
@@ -306,8 +306,15 @@ class Edit extends Component {
306
307
if (!this._backend) {
308
const peerStarConfig = window.__peerStarConfig ? window.__peerStarConfig : config.peerStar
309
+ const defaultAppNames = {
310
+ development: 'peer-pad-dev',
311
+ production: 'peer-pad/2'
312
+ }
313
+ const appName = process.env.APP_NAME ||
314
+ defaultAppNames[process.env.NODE_ENV]
315
+ console.log('peer star app:', appName)
316
console.log('peer star config:', peerStarConfig)
- this._backend = PeerStar(process.env.APP_NAME || 'peer-pad-dev', peerStarConfig)
317
+ this._backend = PeerStar(appName, peerStarConfig)
318
this._backend.on('error', (err) => {
319
console.error(err)
320
window.alert(err.message)
0 commit comments