项目作者: trapcodeio

项目描述 :
A cloud clipper
高级语言: Vue
项目地址: git://github.com/trapcodeio/ownclipboard.git
创建时间: 2019-10-29T11:59:41Z
项目社区:https://github.com/trapcodeio/ownclipboard

开源协议:

下载


OwnClipboard

Demo ownclipboard.com

OwnClipboard was built out of the need to copy/paste text across multiple devices via an application or direct browser access.

Also, OwnClipboard as the name says was built to be owned, meaning that you can host your own clipboard on
your own server with same functions but this time with your data in your control.

Tech Stack

Frontend

Backend

First Time setup

We recommend you use yarn and already have Nodejs installed on your machine.

Install Xjs-Cli (One Time)

xjs-cli is the command line assistant of XpresserJs framework.

  1. yarn global add xjs-cli

Global? yes global because you only need to install this once and it will assist you in all xpresser projects to generate controllers, models, events, migrations e.t.c

  1. cd project_folder
Rename .Env

Rename .env.example to .env and fill in your desired settings.

Install all dependencies
  1. yarn install
Build frontend files.
  1. yarn build

Migrate your database

Out of the box without any deep dive sqlite3 is supported. a database.sqlite file will be created once your server has started.

Install Prod Tools (one Time)

Xpresser uses Nodejs best Mysql ORM knex, for database querying and migrations.
To install knex and other production tools you must run
```shell script
xjs install-prod-tools

  1. if the above failed saying "Invalid command: install-prod-tools", run it outside your project root.
  2. eg
  3. ```shell script
  4. cd backend
  5. xjs install-prod-tools

After installation, knex should be available on your machine.
Now run xjs migrate to create our tables and database structure
```shell script
xjs migrate

  1. ### Start Backend Server
  2. ##### Development
  3. ```shell script
  4. node ownclipboard.js
  5. # or
  6. xjs start

using xjs start enables server auto reload using nodemon.

In development your server can be stopped by quitting your console.

Production

In production, your server will be handled by a production tool installed by xjs install-prod-tools called pm2
```shell script

START

xjs start —prod

STOP

xjs stop server

  1. That's all! You should have your **own**clipboard up and running on your server.
  2. ##### Compiles and hot-reloads for development
  3. Just like every vue-cli app you can enable hot-reload using
  4. ```sh
  5. yarn run serve

Note: the above will spring up a development server that will be in a different port.
Backend server also needs to be running in development in order to connect perfectly.