From de975f0f62ff4e566f1660c528e8b8de8e69ac7c Mon Sep 17 00:00:00 2001 From: Pitu Date: Fri, 13 Jan 2017 04:48:18 -0300 Subject: Updated readme --- README.md | 19 ++++++++++++++----- config.sample.js | 43 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+), 5 deletions(-) create mode 100644 config.sample.js diff --git a/README.md b/README.md index 96f6abd..1a50599 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,16 @@ -<<<<<<< HEAD # loli-bank Pomf-like image uploading service, written in NodeJS -======= -# loli-safe -Pomf-like file uploading service, written in NodeJS ->>>>>>> b285f244150d0eb79376716501a97b9416497344 + +--- +1. Clone +2. Rename `config.sample.js` to `config.js` +3. Modify port and prvacy options if desired +4. run `npm install` to install all dependencies +5. run `node lolisafe.js` to start the service + +--- +## Using it +After the service is started, you can POST files to /api/upload . The file key needs to be called `file` and it should be a `multipart/form-data` upload, or else it will be disregarded. + +This works great with sharex, just like [mixtape.moe](https://mixtape.moe) and [cuntflaps.me](https://cuntflaps.me). +A chrome extension to be able to right click images -> send to safe is in the works. \ No newline at end of file diff --git a/config.sample.js b/config.sample.js new file mode 100644 index 0000000..ce9cb70 --- /dev/null +++ b/config.sample.js @@ -0,0 +1,43 @@ +module.exports = { + + // Port on which to run the server + port: 9999, + + // Upload restrictions + privacy: { + + // Is the service public? If so, anyone with the URL can upload files + public: false, + + // If not, which IP's should be able to access? + IPs: [ + '::1', + '127.0.0.1' + ] + }, + + // Uploads config + uploads: { + + // Folder where images should be stored + folder: 'uploads', + + // Max file size allowed + maxsize: '512MB' + }, + + // Folder where to store logs + logsFolder: 'logs', + + // The length of the random generated name for the uploaded files + fileLength: 4, + + // The following values shouldn't be touched + database: { + client: 'sqlite3', + connection: { + filename: './db' + }, + useNullAsDefault: true + } +} \ No newline at end of file -- cgit v1.2.3