diff --git a/README.md b/README.md index 038a09e..c5cd054 100755 --- a/README.md +++ b/README.md @@ -263,7 +263,23 @@ As long as the StorageEngine properly implements `GET`/`PUT`/`DEL`/`HAS` Storage #### But why not "DataEngine"? -Because I was dumb and didn't know what to call it, totally forgetting that "storage engine" would also imply a way to store *files*, not just *data*. +Because I was dumb & didn't know what to call it, totally forgetting that "storage engine" would also imply a way to store *files*, not just *data*. + +## npm scripts + +ass has a number of pre-made npm scripts for you to use. **All** of these scripts should be run using `npm run `. + +| Script | Description | +| ------ | ----------- | +| **`start`** | Starts the ass server. This is the default script & is run with **`npm start`**. | +| `setup` | Starts the easy setup process. Should be run once after installing ass, & also after any updates that introduce new configuration options. | +| `metrics` | Runs the metrics script. This is a simple script that outputs basic resource statistics. | +| `new-token` | Generates a new API token. Accepts one parameter for specifying a username, like `npm run new-token `. ass automatically detects the new token & reloads it, so there's no need to restart the server. | +| `update` | Runs update tasks. These will update ass to the latest version by first restoring `package-lock.json` (which tends to overrite on `git pull`), pulling changes with `git pull`, then running `npm i` to install any new dependencies. This is the recommended way to update ass. After updating, you will need to restart ass. | +| `update-full` | Runs the previous update script, followed by `npm run setup` to ensure that all the latest configuration options are set. The setup script uses your **existing** config for setting defaults to make updates much quicker. If any ass Release Notes say to use `update-full` instead of `update`, then use `update-full`. | +| `restart` | Restarts the ass server using `systemctl`. More info soon (should work fine if you have an existing `ass.service` file) | +| `engine-check` | Ensures your environment meets the minimum Node & npm version requirements. | +| `logs` | Uses the [tlog Socket plugin](https://github.com/tycrek/tlog#socket) to stream logs from the ass server to your terminal, with full colour support (Remember to set [`FORCE_COLOR`](https://nodejs.org/dist/latest-v14.x/docs/api/cli.html#cli_force_color_1_2_3) if you're using Systemd) | ## Flameshot users (Linux) diff --git a/package.json b/package.json index 71c496c..48ca548 100755 --- a/package.json +++ b/package.json @@ -12,14 +12,12 @@ "setup": "node setup.js", "metrics": "node metrics.js", "new-token": "node generators/token.js", - "update": "git restore package-lock.json && git pull && npm i && npm run restart", + "update": "git restore package-lock.json && git pull && npm i", + "update-full": "npm run update && npm run setup", "restart": "systemctl restart ass.service", - "reset": "rm data.json && rm -dr uploads/", - "debug": "node inspect ass.js", "engine-check": "node checkEngine.js", "prestart": "npm run engine-check", "presetup": "npm run engine-check", - "predebug": "npm run engine-check", "logs": "node ./node_modules/@tycrek/log/socketClient.js" }, "repository": "github:tycrek/ass",