@nikelyh/metamorph 2.0.3 → 2.0.4
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/dist/index.js +4 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1092,7 +1092,10 @@ async function createApiServer(store, migrationRunner) {
|
|
|
1092
1092
|
}
|
|
1093
1093
|
const path6 = await import("path");
|
|
1094
1094
|
const fs7 = await import("fs");
|
|
1095
|
-
|
|
1095
|
+
let publicDir = path6.join(import.meta.dirname, "public");
|
|
1096
|
+
if (!fs7.existsSync(publicDir)) {
|
|
1097
|
+
publicDir = path6.join(import.meta.dirname, "../public");
|
|
1098
|
+
}
|
|
1096
1099
|
if (fs7.existsSync(publicDir)) {
|
|
1097
1100
|
app.use(express.static(publicDir));
|
|
1098
1101
|
app.get("*", (_req, res) => {
|