Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add quick start #314

Merged
merged 4 commits into from
May 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions website/docs/Node/node.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ Select the CKB Node that suits your needs and circumstances:

- **Mainnet Node**: Optimal for active involvement in the live network. We suggest a minimum of 100GB of local storage for this purpose.
- **Testnet Node**: Ideal for exploring functionalities in a risk-free environment. We suggest allocating 200GB for experimenting.
- **Devnet Node**: Ideal for local dev environment to start building your CKB dApp. No special local storage required.
- **RPC Node**: Set up a Nervos API endpoint for your project without running any CKB nodes yourself.
Original file line number Diff line number Diff line change
@@ -1,37 +1,28 @@
---
id: dev-environment
title: Dev Environment
sidebar_position: 3
id: run-devnet-node
title: Run a Devnet Node
sidebar_position: 3
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# Dev Environment
# Run a Devnet Node

For developers, a dev environment is the most important place to start their little side projects with blockchain on weekends.
## Quick Start with OffCKB

Here we have provide different ways to setup your CKB dev environment to start your journey.

## Quick Setup with OffCKB

You can set up your local development environment by installing [@offckb/cli](https://www.npmjs.com/package/@offckb/cli). It provides a one-line command to start a Devnet, pre-funded test accounts
and useful [Scripts](/docs/concepts/glossary#script) like [Omnilock](https://github.com/cryptape/omnilock) and [Spore-contract](https://github.com/sporeprotocol/spore-contract).
You can run a devnet node by installing [@offckb/cli](https://www.npmjs.com/package/@offckb/cli). It provides a one-line command to start a Devnet.

### Install

```bash
npm install -g @offckb/cli
```

### Usage
### Start the Devnet

```bash
offckb node # start the Devnet of CKB, `ctrl-c` to stop running the chain
offckb clean # clean the Devnet data, needs to stop running the chain first
offckb init <project-name> # init a CKB dApp typescript boilerplate from multiple templates
offckb accounts # list 20 accounts info with prefund CKB tokens
offckb list-hashes # list built-in scripts hashes, equals `ckb list-hashes`
offckb node # start the Devnet of CKB, `ctrl-c` to stop running the chain
```

---
Expand Down
2 changes: 1 addition & 1 deletion website/docs/Node/run-public-rpc-node.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
id: run-public-rpc-node
title: Run a Public RPC Node
sidebar_position: 3
sidebar_position: 4
---
import useBaseUrl from "@docusaurus/useBaseUrl";
import Tabs from "@theme/Tabs";
Expand Down
Loading