Examples
Learn how to build your own Farcaster apps by looking at examples of simple applications.
Fetch a chronological feed
On your local machine, go through the following steps:
Check out hub-monorepo to your local machine.
Navigate to the
packages/hub-nodejs/examples/chron-feed
directory.Install dependencies with
yarn install
ornpm install
.Run
yarn start
ornpm start
.
INFO
Replace the FIDs at the top of the file with yours to see your messages.
Update your profile picture
On your local machine, go through the following steps:
Check out hub-monorepo to your local machine.
Navigate to the
packages/hub-nodejs/examples/write-data
directory.Install dependencies with
yarn install
ornpm install
.Update
MNEMONIC
andFID
at the top of the file with your own.Run
yarn start
ornpm start
.
INFO
write-data broadcasts to testnet by default, but provides instructions to submit to mainnet
Replicate data to Postgres DB
On your local machine, go through the following steps:
Check out hub-monorepo to your local machine.
Navigate to the
packages/hub-nodejs/examples/replicate-data-postgres
directory.Follow the instructions in README.md
Publish new casts
On your local machine, go through the following steps:
Check out hub-monorepo to your local machine.
Navigate to the
packages/hub-nodejs/examples/make-cast
directory.Install dependencies with
yarn install
ornpm install
.Update
MNEMONIC
andFID
at the top of the file with your own.Run
yarn start
ornpm start
.
INFO
make-cast broadcasts to testnet by default, but provides instructions to submit to mainnet