@sjcrh/proteinpaint-server 2.216.0 → 2.216.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/src/app.js +12 -2
- package/src/serverconfig.js +7 -0
package/src/serverconfig.js
CHANGED
|
@@ -390,6 +390,13 @@ if (!serverconfig.backend_only && fs.existsSync(publicDir)) serverconfig.publicD
|
|
|
390
390
|
const binDir = path.join(process.cwd(), './bin')
|
|
391
391
|
if (!serverconfig.backend_only) serverconfig.binDir = binDir
|
|
392
392
|
|
|
393
|
+
// The proteinpaint-front package's own public/index.html and public/cards, which its init copies into public/ when
|
|
394
|
+
// missing there. The server serves these paths from this dir when public/ does not have them, such as a public/ mount
|
|
395
|
+
// that the init cannot write to (see app.middlewares.js). Auto-computed from cwd like binDir, never operator-set.
|
|
396
|
+
const frontPublicDir = path.join(process.cwd(), 'node_modules/@sjcrh/proteinpaint-front/public')
|
|
397
|
+
delete serverconfig.frontPublicDir
|
|
398
|
+
if (!serverconfig.backend_only && fs.existsSync(frontPublicDir)) serverconfig.frontPublicDir = frontPublicDir
|
|
399
|
+
|
|
393
400
|
if (serverconfig.publicDir) {
|
|
394
401
|
const defaultTarget = path.join(serverconfig.binpath, 'cards')
|
|
395
402
|
if (!serverconfig.cards) {
|