1
0
hugo/content/blog/2023-02-19-bluesky.md
2024-04-23 22:21:26 +09:00

96 lines
2.0 KiB
Markdown

+++
date = "2023-02-19"
tags = ["bluesky","atproto"]
title = "blueskyのatprotoをbuildしてみた"
slug = "bluesky-atproto"
+++
- https://github.com/bluesky-social/atproto
開発には`lerna`を採用しているぽい。
```sh
$ git clone https://github.com/bluesky-social/atproto
$ cd atproto
$ node -v
$ nvm use v18
# https://www.npmjs.com/package/lerna
$ npm i -g node-gyp
$ npm i -g npm
$ npm i -g lerna
$ npm i
$ lerna run build
or
$ npm run build
$ lerna run build
lerna notice cli v6.5.1
> Lerna (powered by Nx) The task graph has a circular dependency
@atproto/api:build --> @atproto/pds:build --> @atproto/api:build
✔ @atproto/nsid:build (643ms)
✔ @atproto/common:build (647ms)
✔ @atproto/uri:build (653ms)
✔ @atproto/crypto:build (684ms)
✔ @atproto/lexicon:build (774ms)
✔ @atproto/handle:build (852ms)
✔ @atproto/plc:build (901ms)
✔ @atproto/aws:build (987ms)
✔ @atproto/xrpc:build (657ms)
✔ @atproto/did-resolver:build (661ms)
✔ @atproto/lex-cli:build (1s)
✔ @atproto/xrpc-server:build (708ms)
✔ @atproto/repo:build (655ms)
✔ @atproto/pds:build (767ms)
✔ @atproto/api:build (539ms)
✔ @atproto/dev-env:build (727ms)
> Lerna (powered by Nx) Successfully ran target build for 16 projects (5s)
```
```sh
$ ls packages/*/dist/
$ ls packages/*/*.env
$ cat packages/*/*.env
DB_POSTGRES_URL="postgres://bsky:yksb@localhost/pds_dev"
```
- https://github.com/bluesky-social/atproto-website
```sh
$ npm run dev
```
### packages/pds
```sh
$ cd packages/pds
$ cat pacakge.json
$ yarn install
$ yarn codegen
$ open -a docker
$ yarn test:pg
$ yarn verify
# env:DB_POSTGRES_UR, HOSTNAME
$ yarn build
$ yarn start
```
```sh
$ fly proxy 5432 -a xxx
DB_POSTGRES_URL="postgres://xxx@127.0.0.1:5432/xxx"
$ node dist/bin.js
---
# bluesky for ios
server : 192.168.x.x:2853
---
# https://gitlab.com/bnewbold/adenosine/-/blob/main/notes/atproto_quickstart.md
$ http get $HOST/xrpc/com.atproto.getAccountsConfig
```