https://github.com/weakish/fileup
A file uploader demo powered by LeanCloud and Svelte.
https://github.com/weakish/fileup
demo leancloud svelte typescript
Last synced: about 1 year ago
JSON representation
A file uploader demo powered by LeanCloud and Svelte.
- Host: GitHub
- URL: https://github.com/weakish/fileup
- Owner: weakish
- License: 0bsd
- Created: 2021-04-02T16:04:26.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-06-10T04:29:58.000Z (almost 5 years ago)
- Last Synced: 2025-01-12T18:12:02.210Z (about 1 year ago)
- Topics: demo, leancloud, svelte, typescript
- Language: JavaScript
- Homepage:
- Size: 195 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# When Svelte Meets LeanCloud Files
This is a simple file uploader demo built with [LeanCloud], Svelte, and TypeScript.
[LeanCloud]: https://leancloud.app
## Quick Start
### Configuration
Register an account and create an application at [LeanCloud], and fill in your application information in `src/App.svelte`:
```js
const appId = "your app id";
const appKey = "your app key";
const serverURL = "https://your-custom-domain.example.com";
```
You can obtain the required information from LeanCloud dashboard (`Settings > AppKey`).
The domain name in `serverURL` is the first domain in `Settings > AppKey > Domain whitelist > Request domain`.
### Install Dependencies
```sh
npm install
```
### Start a Local Server
```sh
npm run dev
```
### Build for the Production Environment
```sh
npm run build
```
Then upload the `public` directory to any web hosting service,
e.g. [LeanEngine]:
```sh
cd public
lean switch --region us-w1 --group web YOUR_APP_ID
lean deploy --prod 1
```
[LeanEngine]: https://docs.leancloud.app/leanengine_overview.html