Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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/)