diff --git a/packages/pinorama-docs/.vitepress/config/en.ts b/packages/pinorama-docs/.vitepress/config/en.ts index 9af1d08..2cb6741 100644 --- a/packages/pinorama-docs/.vitepress/config/en.ts +++ b/packages/pinorama-docs/.vitepress/config/en.ts @@ -56,11 +56,11 @@ export const en = defineConfig({ }, { text: "Quick Start", - link: "/guide/quick-start/" + link: "/guide/quick-start" }, { text: "Use Cases", - link: "/guide/use-cases/" + link: "/guide/use-cases" } ] }, @@ -69,19 +69,19 @@ export const en = defineConfig({ items: [ { text: "Overview", - link: "/guide/pinorama-studio/" + link: "/pinorama-studio" }, { text: "Installation", - link: "/guide/pinorama-studio/installation/" + link: "/pinorama-studio/installation" }, { text: "Usage", - link: "/guide/pinorama-studio/usage/" + link: "/pinorama-studio/usage" }, { text: "CLI", - link: "/guide/pinorama-studio/api/" + link: "/pinorama-studio/api" } ] }, @@ -90,19 +90,19 @@ export const en = defineConfig({ items: [ { text: "Overview", - link: "/guide/pinorama-client/" + link: "/pinorama-client" }, { text: "Installation", - link: "/guide/pinorama-client/installation/" + link: "/pinorama-client/installation" }, { text: "Usage", - link: "/guide/pinorama-client/usage/" + link: "/pinorama-client/usage" }, { text: "API Reference", - link: "/guide/pinorama-client/api/" + link: "/pinorama-client/api" } ] }, @@ -111,19 +111,19 @@ export const en = defineConfig({ items: [ { text: "Overview", - link: "/guide/pinorama-server/" + link: "/pinorama-server" }, { text: "Installation", - link: "/guide/pinorama-server/installation/" + link: "/pinorama-server/installation" }, { text: "Configuration", - link: "/guide/pinorama-server/configuration/" + link: "/pinorama-server/configuration" }, { text: "API Reference", - link: "/guide/pinorama-server/api/" + link: "/pinorama-server/api" } ] }, @@ -132,15 +132,15 @@ export const en = defineConfig({ items: [ { text: "Overview", - link: "/guide/pinorama-transport/" + link: "/pinorama-transport" }, { text: "Installation", - link: "/guide/pinorama-transport/installation/" + link: "/pinorama-transport/installation" }, { text: "Usage", - link: "/guide/pinorama-transport/usage/" + link: "/pinorama-transport/usage" } ] } diff --git a/packages/pinorama-docs/guide/index.md b/packages/pinorama-docs/guide/index.md index c0383b5..ea34f2d 100644 --- a/packages/pinorama-docs/guide/index.md +++ b/packages/pinorama-docs/guide/index.md @@ -9,7 +9,7 @@ outline: deep ::: tip **Need a Quick Start?** 🚀 -If you're looking to get started quickly, check out [Pinorama Studio](/studio/), a Web App and CLI that allows you to store, view, filter, and analyze logs with minimal setup. +If you're looking to get started quickly, check out [Pinorama Studio Quickstart](/guide/quick-start/), a Web App and CLI that allows you to store, view, filter, and analyze logs with minimal setup. ::: ## Understanding the suite diff --git a/packages/pinorama-docs/guide/quick-start.md b/packages/pinorama-docs/guide/quick-start.md new file mode 100644 index 0000000..199458c --- /dev/null +++ b/packages/pinorama-docs/guide/quick-start.md @@ -0,0 +1,89 @@ +--- +outline: deep +--- + +# Quick Start + +Get up and running with **Pinorama Studio** in minutes! This guide will walk you through the process of installing Pinorama Studio and integrating it with a simple Node.js application. + +## Prerequisites + +- [Node.js](https://nodejs.org/) version 20 or higher. +- Terminal for starting the Pinorama Studio CLI. + +## Installation + +Install Pinorama Studio globally: + +::: code-group + +```sh [npm] +npm i -g pinorama-studio +``` + +```sh [pnpm] +pnpm i -g pinorama-studio +``` + +```sh [yarn] +yarn global add pinorama-studio +``` + +::: + +## Quick Setup + +Let's set up a minimal Fastify application with Pinorama Studio for log viewing: + +1. Create a new directory: + + ```sh + mkdir pinorama-demo && cd pinorama-demo + ``` + +2. Install Fastify: + + ::: code-group + + ```sh [npm] + npm add fastify + ``` + + ```sh [pnpm] + pnpm add fastify + ``` + + ```sh [yarn] + yarn add fastify + ``` + + ::: + +3. Create an `index.js` file with the following content: + + ```javascript + const fastify = require("fastify")({ + logger: true, // needed for piping logs to Pinorama! + }); + + fastify.get("/", async (request, reply) => { + request.log.info("Pinorama is awesome! 🚀"); + return { hello: "world" }; + }); + + fastify.listen({ port: 3000 }); + ``` + +4. Run your application and pipe the output to Pinorama Studio: + + ```sh + node index.js | pinorama --open + ``` + +This command will start your Fastify application, pipe its logs to Pinorama Studio, and open the Pinorama web interface in your default browser. + +## Next Steps + +Check out the full Pinorama documentation for information on customizing your logging setup and using other Pinorama components. + +Happy logging with Pinorama!