-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from dao-xyz/blog-platform
New demo: Blog platform
- Loading branch information
Showing
27 changed files
with
2,471 additions
and
809 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# 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. | ||
|
||
|
||
## CLI | ||
|
||
This is the UI | ||
|
||
<img src="./demo-cli.gif" width="600" /> | ||
|
||
There is a CLI application inside [./cli](./cli), that allows you to do the basic functionality. | ||
|
||
Install from remote: | ||
|
||
```sh | ||
npm install @peerbit/blog -g | ||
``` | ||
|
||
Launch it | ||
```sh | ||
blog | ||
``` | ||
|
||
|
||
### Run CLI locally | ||
To run it locally: | ||
|
||
First go to the root folder of the exampels repo and build it | ||
|
||
``` | ||
yarn build | ||
``` | ||
|
||
Then go back to the [./cli](./cli) folder and now you can do: | ||
|
||
```node ./cli/lib/esm/bin.js``` instead of ```blog``` to invoke the cli. | ||
|
||
|
||
|
||
## Server | ||
|
||
This package contains an express server that wraps the blog client | ||
|
||
You can interact with the server using API tools, like Insomnia to read blog posts | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"watch": ["src"], | ||
"ext": "ts", | ||
"ignore": ["src/__tests__/**"], | ||
"exec": "ts-node --esm ./src/bin.ts", | ||
"stdin": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{ | ||
"name": "@peerbit/blog", | ||
"version": "0.0.1", | ||
"author": "dao.xyz", | ||
"repository": "https://github.com/@dao-xyz/peerbit-examples", | ||
"license": "Apache-2.0", | ||
"type": "module", | ||
"private": false, | ||
"sideEffects": false, | ||
"module": "lib/esm/index.js", | ||
"types": "lib/esm/index.d.ts", | ||
"exports": { | ||
"import": "./lib/esm/index.js" | ||
}, | ||
"bin": { | ||
"blog": "./lib/esm/bin.js" | ||
}, | ||
"files": [ | ||
"lib", | ||
"src", | ||
"!src/**/__tests__", | ||
"!lib/**/__tests__", | ||
"LICENSE" | ||
], | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"engines": { | ||
"node": ">=16.15.1" | ||
}, | ||
"scripts": { | ||
"clean": "shx rm -rf lib/*", | ||
"build": "yarn clean && tsc -p tsconfig.json", | ||
"test": "node ../../../node_modules/.bin/jest test -c ../../../jest.config.ts --runInBand --forceExit", | ||
"test:unit": "node ../../../node_modules/.bin/jest test -c ../../../jest.config.unit.ts --runInBand --forceExit", | ||
"test:integration": "node ../../../node_modules/.bin/jest test -c ../../../jest.config.integration.ts --runInBand --forceExit", | ||
"watch": "nodemon" | ||
}, | ||
"devDependencies": { | ||
"typescript": "^5.3.3", | ||
"@types/inquirer": "^9" | ||
}, | ||
"dependencies": { | ||
"@peerbit/blog-sdk": "^0.0.1", | ||
"@inquirer/editor": "^2", | ||
"@inquirer/select": "^2", | ||
"@inquirer/input": "^2" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { start } from "./cli.js"; | ||
|
||
start(); |
Oops, something went wrong.