mirror of
https://github.com/tlsnotary/explorer.git
synced 2026-01-09 21:07:55 -05:00
chore(server): update readme
This commit is contained in:
@@ -11,6 +11,8 @@
|
||||
"watch:server": "NODE_ENV=development webpack --config webpack.server.config.js --watch",
|
||||
"nodemon:server": "NODE_ENV=development nodemon build/server/index.bundle.js",
|
||||
"dev:server": "NODE_ENV=development concurrently npm:watch:server npm:nodemon:server",
|
||||
"start": "node build/server/index.bundle.js",
|
||||
"build": "concurrently npm:build:ui npm:build:server",
|
||||
"dev": "concurrently npm:watch:ui npm:dev:server"
|
||||
},
|
||||
"repository": {
|
||||
|
||||
30
readme.md
30
readme.md
@@ -8,8 +8,36 @@ npm i
|
||||
npm run dev
|
||||
```
|
||||
|
||||
## Build
|
||||
## Build and Start
|
||||
```bash
|
||||
npm i
|
||||
npm run build
|
||||
npm start
|
||||
```
|
||||
|
||||
## Server API
|
||||
|
||||
### POST /upload
|
||||
|
||||
Request:
|
||||
```
|
||||
curl -F 'data=@/path/to/file' http://localhost:3000/upload
|
||||
```
|
||||
|
||||
Response:
|
||||
```
|
||||
// CID string
|
||||
bafkreihlmzaynphb7cunvjjsm25w3uw5dbqvifq3wzppw33jztqqrx6oqi
|
||||
```
|
||||
|
||||
### GET /ipfs/:cid
|
||||
|
||||
Request:
|
||||
```
|
||||
curl http://localhost:3000/ipfs/bafkre....tqqrx6oqi
|
||||
```
|
||||
|
||||
Response:
|
||||
```
|
||||
download file bafkre....tqqrx6oqi.json
|
||||
```
|
||||
Reference in New Issue
Block a user