The blue eye cloud disk
Online Demo (Experience account: [email protected] Password: 123456)
Github Backend Tank address
Github front tank-front address
Introduction to the
Blue Eye cloud disk is one of the open source software of blue Eye series and also the basic service software of other blue Eye series. Blue Eye blog has the following features:
1. The software is small in size, cross-platform and easy to run
-
The blue Eye cloud disk installation package is about 6 MB and can be installed and run on Windows Linux MAC OS.
-
Blue Eye cloud disk is green software. Decompress the installation package and modify the configuration file.
2. Easy to use, complete core functions
-
Blue Eye cloud disk mainly supports PC Web, while mobile phone Web also has good responsiveness support.
-
Blue eye cloud disk to achieve the cloud disk (such as: Baidu cloud disk, micro cloud) core functions: folder management, file management, upload files, download files, file sharing and so on.
-
Blue Eye cloud disk provides an account management system. The super administrator can manage users and view user files, while ordinary users can only view their own files and modify their own information. The experience account provided above is an ordinary user account.
3. Support interface programming
-
Blue Eye cloud disk provides a programming interface, to achieve the core functions of cloud storage (such as: seven niuyun, Ali Cloud OSS), you can use the programming interface to upload files, as the resource storage of other websites, systems, apps. You can zoom in and out when downloading images, which can effectively save client traffic.
-
Blue Eye Blog, the second in the blue Eye series of open source software, uses blue Eye blog as a third-party resource storage. All the pictures in blue Eye blog are stored in blue Eye cloud disk.
4. The front and back ends are separated, and the documents are rich
-
Golang was used to develop the back end of the project and VUE suite was used to develop the front end.
-
Blue eye cloud disk has detailed background API documents, for learning front-end children’s shoes can quickly deploy a formal and has a rich interface back end for learning to use.
-
The backend technology stack uses Golang without any Web framework; Initial installation, life cycle control, route management, route matching, log management, dependency injection, error handling, Panic interception, packaging, installation script and other functions are purely manual, green, so the code is more refined, more valuable for discussion and learning.
If you find blue eye cloud disk to help you, please do not spare your star
Software screenshots
The installation
** a) Preparation **
-
A Windows/Linux server, although you can use your own computer as the server
-
Install the Mysql database
-
Download the installation package for the server
-
Decompress the file on the server and modify the configuration file conf/tank.json.
{// Port on which the server runs, default 6010. If set to 80, it can be opened directly using HTTP"ServerPort": 6010, // Whether logs need to be printed to the console, defaultfalseIs used for debugging"LogToConsole": false//Mysql port, default 3306"MysqlPort": 3306, //Mysql host"MysqlHost": "127.0.0.1"//Mysql database name"MysqlSchema": "tank"//Mysql user name. You are advised to create a user for the blue Eye cloud disk. You are not advised to use root"MysqlUserName": "tank", / / Mysql password"MysqlPassword": "tank123"// The name of the super administrator can contain only letters and digits"AdminUsername": "admin"// Super administrator's email address as the login account"AdminEmail": "[email protected]"// Super administrator password"AdminPassword": "123456"
}
Copy the code
** b) Run **
-
For Windows, double-click Tank. exe in the application directory.
-
Linux Platform Implementation
cdApplication directory path./tankCopy the code
If you want your application to continue running after closing the shell window, use the following script to start and stop it
#Start the applicationCD Application directory directory /service./startup.sh
#Stop the applicationCD Application directory directory /service./shutdown.shCopy the code
** c) verify **
In the browser, open http://127.0.0.1:6010 (127.0.0.1 please use the server IP address, 6010 please use the ServerPort configured in tank.json) and you can see the login page. In addition, after successful login using the email address and password in the configuration file, you can see all files (see the screenshot above), which indicates that the installation is successful.
Package your own using source code
Front-end project packaging
-
clone tank-front
-
Install dependencies
npm install
Copy the code
- Execute pack command
npm run build
Copy the code
- Through the first three steps can be in
dist
Folder gets packed after the static files willdist
Copy all files in the directory to the backend projectbuild/html
Under the folder. (Also described in the project catalogue below)
Back-end project packaging
-
clone tank
-
Install Golang and configure the environment variable GOPATH to the project directory. The recommended project directory structure is as follows:
golang # Path of the environment variable GOPATH├ ─ ─ bin# directory of executable files generated by compilation├ ─ ─ PKGBuild third-party libraries├ ─ ─ the SRC# Golang project source code│ ├ ─ ─ at github.com# third-party library from Github│ ├ ─ ─ at golang.org# third-party library from Golang.org│ ├ ─ ─ tank#clone down the tank root directory│ │ ├ ─ ─ the build# a folder to assist with packaging│ │ ├─ confThe default configuration file│ │ ├─ Doc# documentation│ │ ├─ HTMLFront-end static resources, obtained from the project tank-front compilation│ │ ├─ Pack# Packaged script│ │ ├─ ServiceUse Tank as a service startup script│ │ ├ ─ ─ distThe installation package directory obtained after running the package script│ │ ├ ─ ─ a rest# golang source code
Copy the code
- Prepare third-party libraries that the project depends on
- golang.org/x
- github.com/disintegration/imaging
- github.com/json-iterator/go
- github.com/go-sql-driver/mysql
- github.com/jinzhu/gorm
- github.com/nu7hatch/gouuid
Golang.org/x cannot be downloaded in China. Please download it here and place it in the directory structure recommended above. Other dependencies can be downloaded automatically through the installation script.
- packaging
-
Windows platform double-clicked tank/build/pack/build. The bat, after the success can be seen under the tank/dist tank – X.X.X folder, the folder is the final installation package.
-
On Linux, run the following command:
cd tank/build/pack/
./build.sh
Copy the code
Tank-x.x.x. linux-amd64.tar.gz can be found under Tank /dist
With the obtained installation package, you can refer to the installation section above for installation.
The related documents
Blue Eye cloud disk back-end API
Blue eye cloud disk programming interface
Contribution
Thank you to all the blue Eye Cloud Disk contributors @Zicla, @Seaheart, @Yemuhe, @hxsherry
If you want to get involved, feel free to fork, star, post issue, pull requests
License
MIT
Copyright (c) 2017-present, eyeblue.cn
The original published on the blog. Eyeblue. Cn/home/articl…