diff --git a/Dockerfile b/Dockerfile index ed889fa..d50edef 100644 --- a/Dockerfile +++ b/Dockerfile @@ -30,6 +30,8 @@ RUN npm run build RUN npm ci --omit=dev +ENV NODE_ENV=production + # Expose port EXPOSE 3000 diff --git a/main.ts b/main.ts index 2ef6f37..275bd76 100644 --- a/main.ts +++ b/main.ts @@ -60,7 +60,7 @@ export const generateThingy = async (username: string, filterYear?: number): Pro if (month === '') { continue } - correctedData[month] = Array(31).fill(0) + correctedData[month] = Array(32).fill(0) } // loop through each dates @@ -104,6 +104,10 @@ export const generateThingy = async (username: string, filterYear?: number): Pro final += `text = "${username}";\n` final += `year = "${filterYear}";\n` + if (process.env.NODE_ENV !== 'production') { + console.log(final) + } + // Fetch the CAD file let cadPath = './3d.scad' if (!await exists(cadPath)) {