docs.waku.org/assets/js/7f664d3b.e59fc5f7.js

1 line
9.0 KiB
JavaScript
Raw Permalink Normal View History

2025-10-27 23:35:15 +00:00
"use strict";(self.webpackChunkwaku_guide=self.webpackChunkwaku_guide||[]).push([[6895],{28453:(e,n,t)=>{t.d(n,{R:()=>l,x:()=>a});var i=t(96540);const s={},r=i.createContext(s);function l(e){const n=i.useContext(r);return i.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:l(e.components),i.createElement(r.Provider,{value:n},e.children)}},39789:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>o,contentTitle:()=>a,default:()=>u,frontMatter:()=>l,metadata:()=>i,toc:()=>d});const i=JSON.parse('{"id":"build/javascript/local-dev-env","title":"Set Up a Local Development Environment","description":"The most reliable way to ensure your js-waku application will work in realistic conditions is to spin up a local nwaku fleet and test against it.","source":"@site/docs/build/javascript/local-dev-env.md","sourceDirName":"build/javascript","slug":"/build/javascript/local-dev-env","permalink":"/build/javascript/local-dev-env","draft":false,"unlisted":false,"editUrl":"https://github.com/waku-org/docs.waku.org/tree/develop/docs/build/javascript/local-dev-env.md","tags":[],"version":"current","lastUpdatedAt":null,"frontMatter":{"title":"Set Up a Local Development Environment"},"sidebar":"build","previous":{"title":"Scaffold DApps Using @waku/create-app","permalink":"/build/javascript/use-waku-create-app"},"next":{"title":"Bootstrap Nodes and Discover Peers","permalink":"/build/javascript/configure-discovery"}}');var s=t(74848),r=t(28453);const l={title:"Set Up a Local Development Environment"},a="Set Up a Local Development Environment",o={},d=[{value:"Requirements",id:"requirements",level:2},{value:"Quick Start",id:"quick-start",level:2},{value:"1. Start the Network",id:"1-start-the-network",level:3},{value:"2. Connect Your js-waku App",id:"2-connect-your-js-waku-app",level:3},{value:"3. Stop When Done",id:"3-stop-when-done",level:3},{value:"Available Commands",id:"available-commands",level:2},{value:"Using npx (published package)",id:"using-npx-published-package",level:3},{value:"Configuration",id:"configuration",level:2},{value:"Custom Ports",id:"custom-ports",level:3},{value:"Cluster Configuration",id:"cluster-configuration",level:3},{value:"Custom nwaku Version",id:"custom-nwaku-version",level:3},{value:"Debugging",id:"debugging",level:2},{value:"View Node Logs",id:"view-node-logs",level:3},{value:"Check Node Health",id:"check-node-health",level:3},{value:"Check Peer Connections",id:"check-peer-connections",level:3}];function c(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"set-up-a-local-development-environment",children:"Set Up a Local Development Environment"})}),"\n",(0,s.jsx)(n.p,{children:"The most reliable way to ensure your js-waku application will work in realistic conditions is to spin up a local nwaku fleet and test against it."}),"\n",(0,s.jsx)(n.h2,{id:"requirements",children:"Requirements"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"https://www.docker.com/products/docker-desktop/",children:"Docker Desktop"})," or Docker Engine with Compose plugin"]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"quick-start",children:"Quick Start"}),"\n",(0,s.jsx)(n.h3,{id:"1-start-the-network",children:"1. Start the Network"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"npx @waku/run start\n"})}),"\n",(0,s.jsx)(n.p,{children:"This will:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Start 2 nwaku nodes and a PostgreSQL database"}),"\n",(0,s.jsx)(n.li,{children:"Run in the background (detached mode)"}),"\n",(0,s.jsx)(n.li,{children:"Display connection information you need for your app"}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Example output:"})}),"\n"