Skip to content

Latest commit

 

History

History
70 lines (53 loc) · 1.35 KB

_quickstart-02-prereqs-and-installation.mdx

File metadata and controls

70 lines (53 loc) · 1.35 KB

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

Installation

:::info

Prerequisites

:::

1. Create a directory

This will be the home of your new Web5 app. In your CLI:

mkdir web5-app
cd web5-app

2. Install Web5

Use NPM to install Web5:

npm install @tbd54566975/[email protected]

:::note After npm resolves the dependency, you may see a few warnings. You can ignore these for now. :::

This will create a package.json in the root of your project. Open package.json and add module as a type:

{
  "dependencies": {
    "@tbd54566975/web5": "0.7.2"
  },
  "type": "module"
}

3. Import Web5

Let's create a src directory and index.js file to write our application:

mkdir src
cd src
touch index.js

Open index.js in your editor and add this line at the top of the file to import Web5:

import { Web5 } from '@tbd54566975/web5';

Now we have the Web5 SDK installed and are ready to start building!