Update the readme
This commit is contained in:
parent
6f3e2f65ad
commit
48081b63a0
2 changed files with 20 additions and 5 deletions
19
README.md
19
README.md
|
@ -1,5 +1,22 @@
|
||||||
# bun-activitypub
|
# bun-activitypub
|
||||||
|
|
||||||
|
This is a basic ActivityPub server written in JavaScript, using [Bun](https://bun.sh).
|
||||||
|
It is very much based on [existing work](https://github.com/jakelazaroff/activitypub-starter-kit)
|
||||||
|
but has been re-written to work with Bun instead of Node/Express. This is as much about a personal learning experience as anything.
|
||||||
|
|
||||||
|
In the beginning, this server only supports following/unfollowing (and being followed/unfollowed in return), as well as posting simple notes - which do get sent out to followers.
|
||||||
|
|
||||||
|
Rather than store data in a database, it currently stores create activity data in json files, and created posts in markdown files with YAML frontmatter for metadata.
|
||||||
|
The hope is this will allow me to use something like [11ty](https://www.11ty.dev/) to generate my own website for people to view and interact with my posts in the future.
|
||||||
|
I may also experiment with pushing the content to a seperate git repository so I can utilize automated scripts to build and publish the web front-end.
|
||||||
|
|
||||||
|
## Dependencies
|
||||||
|
- Bun has it's own built-in http server, so this project uses that rather than something like Express.
|
||||||
|
- It uses [`node-forge`](https://github.com/digitalbazaar/forge) for signing and verifying signed posts, as Bun does not yet implement the required `node:crypto` methods
|
||||||
|
- It uses [`gray-matter`](https://github.com/jonschlinkert/gray-matter) for writing and parsing YAML frontmatter in Markdown files
|
||||||
|
|
||||||
|
## Development
|
||||||
|
|
||||||
To install dependencies:
|
To install dependencies:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
@ -9,7 +26,7 @@ bun install
|
||||||
To run:
|
To run:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
bun run index.ts
|
bun run start
|
||||||
```
|
```
|
||||||
|
|
||||||
This project was created using `bun init` in bun v1.0.0. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime.
|
This project was created using `bun init` in bun v1.0.0. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime.
|
||||||
|
|
|
@ -7,15 +7,13 @@
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node-forge": "^1.3.5",
|
"@types/node-forge": "^1.3.5",
|
||||||
"@types/yaml": "^1.9.7",
|
"@types/yaml": "^1.9.7"
|
||||||
"bun-types": "latest"
|
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"typescript": "^5.0.0"
|
"typescript": "^5.0.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"gray-matter": "^4.0.3",
|
"gray-matter": "^4.0.3",
|
||||||
"node-forge": "^1.3.1",
|
"node-forge": "^1.3.1"
|
||||||
"yaml": "^2.3.2"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue