diff --git a/.gitignore b/.gitignore index 7119cfa..c8c9be4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ node_modules .env .data -out \ No newline at end of file +out +config.json \ No newline at end of file diff --git a/README.md b/README.md index 2dd9058..2d30a57 100644 --- a/README.md +++ b/README.md @@ -16,20 +16,45 @@ Then, add your bot token... echo "TOKEN=INSERT-TOKEN.HERE" > .env ``` -Invite your bot to a server, then give it a channel to post in: +Invite your bot to a server, and create a new `config.json` in the project root: ```js // config.json { - ... + "maxDiscordFiles": 20, + "maxDiscordFileSize": 26214400, "targetGuild": "1024080490677936248", "targetChannel": "1024080525993971913", - ... + "requestTimeout":120000, + "maxUploadIdLength":30, + + "accounts": { + "registrationEnabled": true, + "requiredForUpload": false + }, + + "webdrop": { + "accountRequired": false + }, + + "mail": { // nodemailer transport options + "host": "smtp.fastmail.com", // or your mail provider of choice + "port": 465, + "secure": true, + "auth": { + "user": "REPLACE-WITH-YOUR-ALIAS@YOURDOMAIN.COM", + "pass": "REPLACE-WITH-YOUR-GENERATED-PASSWORD" + } + } } ``` -Then, compile and start. +Then, compile: ``` -tsc && npm start +tsc && sass src/style:out/style && rollup -c +``` +and start. +``` +npm start ``` monofile should now be running on either `env.MONOFILE_PORT` or port `3000`. @@ -42,4 +67,4 @@ Although we believe monofile is not against Discord's developer terms of service Code written by monofile's contributors is currently licensed under [Unlicense](https://github.com/nbitzz/monofile/blob/main/LICENSE). -Icons under `/assets/icons` were created by Microsoft, and as such are licensed under [different terms](https://github.com/nbitzz/monofile/blob/1.3.0/assets/icons/README.md). \ No newline at end of file +Icons under `/assets/icons` were created by Microsoft, and as such are licensed under [different terms](https://github.com/nbitzz/monofile/blob/1.3.0/assets/icons/README.md) (MIT). \ No newline at end of file diff --git a/config.json b/config.json index 005bd00..8c02936 100644 --- a/config.json +++ b/config.json @@ -13,5 +13,11 @@ "webdrop": { "accountRequired": false + }, + + "mail": { + "host": "smtp.fastmail.com", + "port": 465, + "secure": true } } \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 41de744..395e863 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,6 +20,7 @@ "dotenv": "^16.0.2", "express": "^4.18.1", "multer": "^1.4.5-lts.1", + "nodemailer": "^6.9.3", "typescript": "^4.8.3" }, "devDependencies": { @@ -1099,6 +1100,14 @@ "node": ">= 0.6" } }, + "node_modules/nodemailer": { + "version": "6.9.3", + "resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-6.9.3.tgz", + "integrity": "sha512-fy9v3NgTzBngrMFkDsKEj0r02U7jm6XfC3b52eoNV+GCrGj+s8pt5OqhiJdWKuw51zCTdiNR/IUD1z33LIIGpg==", + "engines": { + "node": ">=6.0.0" + } + }, "node_modules/normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", @@ -2479,6 +2488,11 @@ "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==" }, + "nodemailer": { + "version": "6.9.3", + "resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-6.9.3.tgz", + "integrity": "sha512-fy9v3NgTzBngrMFkDsKEj0r02U7jm6XfC3b52eoNV+GCrGj+s8pt5OqhiJdWKuw51zCTdiNR/IUD1z33LIIGpg==" + }, "normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", diff --git a/package.json b/package.json index 8b8d2aa..02aaf32 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,7 @@ "dotenv": "^16.0.2", "express": "^4.18.1", "multer": "^1.4.5-lts.1", + "nodemailer": "^6.9.3", "typescript": "^4.8.3" }, "devDependencies": {