From 90eba053f43e8b63e2113431db324679465b286a Mon Sep 17 00:00:00 2001 From: Oscar Beaumont Date: Mon, 8 Aug 2022 12:22:05 +0800 Subject: [PATCH] fix landing page --- apps/landing/package.json | 3 ++- apps/landing/server/index.ts | 21 ++++----------------- packages/ui/package.json | 2 ++ pnpm-lock.yaml | 18 ++++++++++++++++++ 4 files changed, 26 insertions(+), 18 deletions(-) diff --git a/apps/landing/package.json b/apps/landing/package.json index 41103356e..7fc4f973b 100644 --- a/apps/landing/package.json +++ b/apps/landing/package.json @@ -1,5 +1,5 @@ { - "name": "@sd/server", + "name": "@sd/landing", "scripts": { "dev": "npm run server", "prod": "npm run build && npm run server:prod", @@ -43,6 +43,7 @@ "@types/prismjs": "^1.26.0", "@types/react-helmet": "^6.1.5", "@types/tryghost__content-api": "^1.3.11", + "autoprefixer": "^10.4.7", "postcss": "^8.4.14", "sass": "^1.54.0", "tailwind": "^4.0.0", diff --git a/apps/landing/server/index.ts b/apps/landing/server/index.ts index 2e9db6514..afce99ab2 100644 --- a/apps/landing/server/index.ts +++ b/apps/landing/server/index.ts @@ -1,7 +1,6 @@ import express from 'express' import compression from 'compression' import { renderPage } from 'vite-plugin-ssr' -import { networkInterfaces } from 'os' const isProduction = process.env.NODE_ENV === 'production' const root = `${__dirname}/..` @@ -39,20 +38,8 @@ async function startServer() { res.status(statusCode).type(contentType).send(body) }) - const port = process.env.PORT || 3000 - app.listen(port) - console.log(`Server running at http://localhost:${port}`) - - const nets = networkInterfaces(); - - for (const name of Object.keys(nets)) { - // @ts-ignore - for (const net of nets[name]) { - if (net.family === 'IPv4' && !net.internal) { - app.listen(Number(port), net.address, () => { - console.log(`Server running at http://${net.address}:${port}`); - }); - } - } - } + const port = process.env.PORT || 3000; + // @ts-ignore: I don't get why this isn't valid they have a definition matching this. + app.listen(port, '0.0.0.0'); + console.log(`Server running at http://localhost:${port}`); } diff --git a/packages/ui/package.json b/packages/ui/package.json index 43ee7d7e4..813c90201 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -40,8 +40,10 @@ "@storybook/preset-scss": "^1.0.3", "@storybook/react": "^6.5.9", "@storybook/testing-library": "^0.0.13", + "@tailwindcss/typography": "^0.5.4", "@types/react": "^18.0.15", "@types/react-dom": "^18.0.6", + "autoprefixer": "^10.4.7", "babel-loader": "^8.2.5", "css-loader": "^6.7.1", "postcss-loader": "^7.0.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e4072f50a..ed6ef7a0e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -115,6 +115,7 @@ importers: '@types/react-helmet': ^6.1.5 '@types/tryghost__content-api': ^1.3.11 '@vitejs/plugin-react': ^1.3.2 + autoprefixer: ^10.4.7 clsx: ^1.2.1 compression: ^1.7.4 cross-env: ^7.0.3 @@ -172,6 +173,7 @@ importers: '@types/prismjs': 1.26.0 '@types/react-helmet': 6.1.5 '@types/tryghost__content-api': 1.3.11 + autoprefixer: 10.4.7_postcss@8.4.14 postcss: 8.4.14 sass: 1.54.0 tailwind: 4.0.0 @@ -430,8 +432,10 @@ importers: '@storybook/preset-scss': ^1.0.3 '@storybook/react': ^6.5.9 '@storybook/testing-library': ^0.0.13 + '@tailwindcss/typography': ^0.5.4 '@types/react': ^18.0.15 '@types/react-dom': ^18.0.6 + autoprefixer: ^10.4.7 babel-loader: ^8.2.5 clsx: ^1.2.1 css-loader: ^6.7.1 @@ -469,8 +473,10 @@ importers: '@storybook/preset-scss': 1.0.3_bwzccejaufux335em5rfxw325i '@storybook/react': 6.5.9_3eylak3gdxsgyfvgxcahcewwqy '@storybook/testing-library': 0.0.13_biqbaboplfbrettd7655fr4n2y + '@tailwindcss/typography': 0.5.4_tailwindcss@3.1.6 '@types/react': 18.0.15 '@types/react-dom': 18.0.6 + autoprefixer: 10.4.7_postcss@8.4.14 babel-loader: 8.2.5_@babel+core@7.18.9 css-loader: 6.7.1 postcss-loader: 7.0.1_postcss@8.4.14 @@ -5211,6 +5217,17 @@ packages: lodash.merge: 4.6.2 dev: true + /@tailwindcss/typography/0.5.4_tailwindcss@3.1.6: + resolution: {integrity: sha512-QEdg40EmGvE7kKoDei8zr5sf4D1pIayHj4R31bH3lX8x2BtTiR+jNejYPOkhbmy3DXgkMF9jC8xqNiGFAuL9Sg==} + peerDependencies: + tailwindcss: '>=3.0.0 || insiders' + dependencies: + lodash.castarray: 4.4.0 + lodash.isplainobject: 4.0.6 + lodash.merge: 4.6.2 + tailwindcss: 3.1.6 + dev: true + /@tanstack/match-sorter-utils/8.1.1: resolution: {integrity: sha512-IdmEekEYxQsoLOR0XQyw3jD1GujBpRRYaGJYQUw1eOT1eUugWxdc7jomh1VQ1EKHcdwDLpLaCz/8y4KraU4T9A==} engines: {node: '>=12'} @@ -6800,6 +6817,7 @@ packages: normalize-range: 0.1.2 picocolors: 1.0.0 postcss-value-parser: 4.2.0 + dev: false /autoprefixer/10.4.7_postcss@8.4.14: resolution: {integrity: sha512-ypHju4Y2Oav95SipEcCcI5J7CGPuvz8oat7sUtYj3ClK44bldfvtvcxK6IEK++7rqB7YchDGzweZIBG+SD0ZAA==}