Open-source status page, incident response and uptime monitoring
TypeScript alertingincident-managementmcpmcp-servermonitoringmonitoring-as-codeobservabilityon-callopen-sourcesrestatus-pagestatuspagesynthetic-monitoringterraformtinybirdtursouptimeuptime-checkeruptime-monitor
chore: differentiate dev port (#606)
Maximilian Kaskefa43864da871
diff --git a/README.md b/README.mdindex 11d22cff8..6c40b6bfd 100644--- a/README.md+++ b/README.md@@ -74,14 +74,24 @@ with us or send us an email at [[email protected]](mailto:[email protected])4. Follow the steps to run your sqlite database locally inside of[README.md](https://github.com/openstatusHQ/openstatus/blob/main/packages/db/README.md)-5. Start the development server+5. Start the development with the below command```shpnpm dev```-6. Open [http://localhost:3000](http://localhost:3000) with your browser to see- the result.+ It will:++ - run the web app on port `3000`+ - run the api server on port `3001`+ - run the docs on port `3002`++6. See the results:++- open [http://localhost:3000](http://localhost:3000) for the web app+- open [http://localhost:3001/ping](http://localhost:3001/ping) for the api+ server health check+- open [http://localhost:3002](http://localhost:3002) for the docsFor [clerk](https://clerk.com), you will need to create a webhook endpoint. Toaccess the link, you can use tunneling tools likediff --git a/apps/docs/package.json b/apps/docs/package.jsonindex 43290259c..348cd3b9d 100644--- a/apps/docs/package.json+++ b/apps/docs/package.json@@ -3,7 +3,7 @@"version": "0.0.0","private": true,"scripts": {- "dev": "pnpm dlx mintlify@latest dev",+ "dev": "pnpm dlx mintlify@latest dev --port 3002","verify": "pnpm dlx mintlify@latest broken-links"},"keywords": [],diff --git a/apps/server/src/index.ts b/apps/server/src/index.tsindex a2f843e9b..29c3d5ae7 100644--- a/apps/server/src/index.ts+++ b/apps/server/src/index.ts@@ -27,10 +27,14 @@ app.get("/ping", (c) => c.json({ ping: "pong", region: env.FLY_REGION }, 200));app.route("/v1", api);app.route("/", checkerRoute);-if (process.env.NODE_ENV === "development") {- app.showRoutes();-}-console.log("Starting server on port 3000");+const isDev = process.env.NODE_ENV === "development";+const port = isDev ? 3001 : 3000;-export default app;+if (isDev) app.showRoutes();++console.log(`Starting server on port ${port}`);++const server = { port, fetch: app.fetch };++export default server;