Skip to content

Commit

Permalink
fix: add gif
Browse files Browse the repository at this point in the history
  • Loading branch information
marcus-pousette committed Feb 26, 2024
1 parent d62ade8 commit 33682a9
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 24 deletions.
50 changes: 26 additions & 24 deletions packages/blog-platform/README.md
Original file line number Diff line number Diff line change
@@ -1,63 +1,65 @@
# Blog platform

A app that allwos you to do blogging

## Library
In the library folder you can find all code that is handling the file data.
# Blog Platform

An app that allows you to do blogging.

## CLI

This is the UI
This is the app you can interact with:

<img src="./demo-cli.gif" width="600" />
![CLI Demo](./demo-cli.gif)

There is a CLI application inside [./cli](./cli), that allows you to do the basic functionality.
The CLI code is defined in [./cli](./cli).

Install from remote:
Install from npm:

```sh
npm install @peerbit/blog -g
```

Launch it
Launch it:

```sh
blog
```

### Run CLI from Local Build

### Run CLI from local build
To run from local build do:
To run from a local build, do the following:

First go [./cli](./cli)
First, navigate to [./cli](./cli):

```
```sh
yarn
yarn build
node ./cli/lib/esm/bin.js
node ./lib/esm/bin.js
```

## Library

In the library folder, you can find all the code that handles file data. The CLI app uses this library to provide functionality.

## Deploying the Blog Platform to a Server for Persistence

## Deploying the blog-platform to a server for persistance
To keep state available for peers when few peers are online, you might want to host a dedicated server for this. With the Peerbit cli it looks something like this
To keep the state available for peers when only a few peers are online, you might want to host a dedicated server for this. With the Peerbit CLI, it looks something like this:

```sh
npm install -g @peerbit/server
peerbit remote spawn aws --count 1 --size medium --name "blog-platform"
peerbit remote spawn aws --count 1 --size medium --name "blog-platform"
```
wait for server to become ready, then do:

Wait for the server to become ready, then do:

```sh
peerbit remote connect blog-platform-1
install @peerbit/blog-sdk
program open --variant blog-posts
```

Now you have launched a server on your AWS account in the default region. This node will keep whatever posts other have created, and will be available when new peers want to read posts, but no other are online, except this server.

## Express server API wrapper
Now, you have launched a server on your AWS account in the default region. This node will maintain whatever posts others have created and will be available when new peers want to read posts, but no others are online, except this server.

This package contains an express server that wraps the blog client.
## Express Server API Wrapper

see [./server](./server) for more info
This package contains an Express server that wraps the blog client.

See [./server](./server) for more information.
Binary file added packages/blog-platform/demo-cli.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 33682a9

Please sign in to comment.