Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jayjay1024/vite-ipfs-hosting
Vite IPFS Hosting
https://github.com/jayjay1024/vite-ipfs-hosting
ipfs ipfs-web vite vitejs
Last synced: 6 days ago
JSON representation
Vite IPFS Hosting
- Host: GitHub
- URL: https://github.com/jayjay1024/vite-ipfs-hosting
- Owner: JayJay1024
- Created: 2024-05-10T05:39:18.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-05-10T06:36:11.000Z (9 months ago)
- Last Synced: 2024-12-20T23:42:08.749Z (about 1 month ago)
- Topics: ipfs, ipfs-web, vite, vitejs
- Language: TypeScript
- Homepage: https://ipfs.io/ipfs/bafybeiblm27aueasn7wn64g3266ksqzfs5p5vnscp35q37o7mwjf3tvhle
- Size: 44.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Vite IPFS Hosting
### How to Deploy
1. Build
```bash
$ npm install
$ npm run build
```2. Upload to IPFS
Upload the build output (`./dist`) to IPFS
### Mainly Two Points
1. Using hash-router
So we can use the `CID` to access the site, navigate to another page, and reload a sub-page.
`http://127.0.0.1:8081/ipfs/QmQ85BsoKHxvY364jh1hdhDSCd9SBV6HFwSvTLNS7yhm28/#/team`2. Config `base: ''` or `base: './'`
So that after build is completed, the `resource`/`asset` file uses a relative path
```html
Vite + React + TS
```
> **_Note_**: We should put the image files to `public` directory, and use a relative path as source like ``
### Friendly Links
- [IPFS](https://ipfs.tech/)
- [Fleek](https://fleek.xyz/)