Skip to content

Commit

Permalink
Merge pull request #30 from ipfs-shipyard/feat/add-telemetry
Browse files Browse the repository at this point in the history
feat: add telemetry
  • Loading branch information
SgtPooki committed Jan 26, 2023
2 parents 83979b0 + 2a6bc44 commit 9702b6f
Show file tree
Hide file tree
Showing 8 changed files with 2,588 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@ ipfs-check

# Dependency directories (remove the comment below to include it)
# vendor/

# macOS things
.DS_Store
25 changes: 24 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,19 @@ A tool for checking the accessibility of your data by IPFS peers

### Deploy

There's an HTML file in `web` that interacts with the Go HTTP server that can be deployed however you deploy HTML files.
There are web assets in `web` that interacts with the Go HTTP server that can be deployed however you deploy web assets.
Maybe just deploy it on IPFS and reference it with DNSLink.

For anything other than local testing you're going to want to have a proxy to give you HTTPS support on the Go server.

When deploying to prod, since the addition of telemetry (https://github.com/ipfs-shipyard/ipfs-check/pull/30) you will also need to run the following before serving the web assets:
```
cd web
npm install && npm run build
```

At a minimum, the following files should be available from your web-server on prod: `web/index.html`, `web/tachyons.min.css`, `web/dist/telemetry.js`.

## Docker

There's a `Dockerfile` that runs the tool in docker.
Expand All @@ -31,6 +39,21 @@ docker build -t ipfs-check .
docker run -d ipfs-check
```

## Running locally

### Terminal 1
```
go build
./ipfs-check # Note listening port.. output should say something like "listening on [::]:3333"
```

### Terminal 2
```
# feel free to use any other tool to serve the contents of the /web folder (you can open the html file directly in your browser)
npx -y serve -l 3000 web
# Then open http://localhost:3000?backendUrl=http://localhost:3333
```

## License

[SPDX-License-Identifier: Apache-2.0 OR MIT](LICENSE.md)
2 changes: 2 additions & 0 deletions web/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
dist
node_modules
9 changes: 9 additions & 0 deletions web/dist/telemetry.min.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="tachyons.min.css"/>
<link rel="canonical" href="https://ipfs-check.on.fleek.co/">
<script type="text/javascript" src="dist/telemetry.min.js" ></script>
</head>
<body class="sans-serif ma0">
<header>
Expand Down
Loading

0 comments on commit 9702b6f

Please sign in to comment.