A cloud clipper
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.
We recommend you use yarn and already have Nodejs installed on your machine.
xjs-cli is the command line assistant of XpresserJs framework.
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
cd project_folder
Rename .env.example
to .env
and fill in your desired settings.
yarn install
yarn build
Out of the box without any deep dive sqlite3 is supported. a database.sqlite
file will be created once your server has started.
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
if the above failed saying "Invalid command: install-prod-tools", run it outside your project root.
eg
```shell script
cd backend
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
### Start Backend Server
##### Development
```shell script
node ownclipboard.js
# or
xjs start
using xjs start
enables server auto reload using nodemon
.
In development your server can be stopped by quitting your console.
In production, your server will be handled by a production tool installed by xjs install-prod-tools
called pm2
```shell script
xjs start —prod
xjs stop server
That's all! You should have your **own**clipboard up and running on your server.
##### Compiles and hot-reloads for development
Just like every vue-cli app you can enable hot-reload using
```sh
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.