Web based Static File Service, helps transforming small files without USB.
Manage small files with your own server like using a tiny cloud disk.
- Visualization Page
- Download file
- Delete file
- Upload file
- node >= 10.0.0
- npm/cnpm
- Modern Browser(Chrome preferred)
-
Clone the repo
First, clone the repo from the github.
git clone https://github.com/xwy27/leggiero.git
-
Set Account
Modify
setting.js
at the root dir and set your own account and password. Also the files size limitation can be set.For any sharing with the repo, make sure your own Account info in
setting.js
is deleted. -
Build Project
npm run build
-
Start Server
npm start
-
Enjoy
For local access, you can visit
http://yourServerIP:3000
to enjoy leggiero.
Taking light and convenience into consideration, a simple web server is used: koa2
, which is unlike the most website construction - SPA front-end with URL forwarding and back-end server providing data.
Under the developing process, some koa middleware are picked:
- koa-body: parse web request data into json
- koa-router: router control
- koa-send: server sending file
- koa-session: session control
- koa2-static-middleware: static file forward
- nunjucks: web page template
Semantic
, which concerns more about page displaying and is based on jQuery
is chosen as the front-end frame work. According to some discussion of jQuery
, axios
is used for the web request.
After all, this is a toy for myself. I tried to modify the code and learn from it. Hope more helpful things can be done to it.
Your advice is welcomed.
Waiting