From be014f7d62cbae826861ab65cc2a3e647407e7d1 Mon Sep 17 00:00:00 2001 From: notashelf Date: Mon, 4 Apr 2022 20:03:41 +0300 Subject: [PATCH] move images into their own directory --- README.md | 27 +++++++----- .../dick_example_1.png | Bin .../dick_example_2.png | Bin src/constants.ts | 40 ++++++++++++++++++ 4 files changed, 56 insertions(+), 11 deletions(-) rename dick_example_1.png => assets/dick_example_1.png (100%) rename dick_example_2.png => assets/dick_example_2.png (100%) create mode 100644 src/constants.ts diff --git a/README.md b/README.md index 5da4074..1e8501e 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@

- - Login + + Login

Profile Preview - - Profile + + Profile
@@ -82,16 +82,19 @@ Inside this file, is some basic configuration you can change for your set up. Th | Variable | Description | | --------------------------------------------- | :---------------------: | | `DICK_SUBMODULE = false` | Put this to true if you wish to run DICK as an ASS submoduke, false if seperate | -| `ASSLOCATION = "../ass"` | If running DICK seperately, DICK will use this to find your ASS install folder | -| `ASSSECURE = false` | Put this to true if you are running ASS behind a domain with HTTPS,. false if HTTP | +| `ASS_LOCATION = "../ass"` | If running DICK seperately, DICK will use this to find your ASS install folder | +| `ASS_SECURE = false` | Put this to true if you are running ASS behind a domain with HTTPS,. false if HTTP | | `ASSDOMAIN = "127.0.0.1:40115"` | Put this to your ASS domain. Can be an ip, or domain for example `https://cdn.mydomain.com` | | `STAFF_IDS = ["ass"]` | Change this to whatever your username is in your ASS `auth.json` file. Default user in ASS, is `ass` | ### Running + #### Development
- Open to view the development set up steps + + Open to view the development set up steps + 1. Create a folder, call it whatever you wish 2. Install, and run ASS https://github.com/tycrek/ass#installation (This will create an `ass` folder) @@ -107,16 +110,18 @@ Inside this file, is some basic configuration you can change for your set up. Th #### Production
- Open to view the production set up steps
- + + Open to view the production set up steps +
+ 1. Create a folder, call it whatever you wish 2. Install, and run ASS https://github.com/tycrek/ass#installation (This will create an `ass` folder) - 3. Go back into the folder you created and clone this repo `git clone https://github.com/Facinorous-420/dick` + 3. Go back into the folder you created and clone this repo `git clone https://github.com/Facinorous-420/dick.git` 4. Go into the newly created `dick` folder `cd dick` 5. Go into `/src` and copy `CONSTANTS.ts.example` to `CONSTANTS.ts` and edit it as needed 6. Go back to the root of `dick` and install the dependancies for the frontend, `npm i` 7. Run `npm start` to compile the code base and run DICK - +
When you approach the login screen, your secret key is the key generated for your account. You should not share this with anyone. diff --git a/dick_example_1.png b/assets/dick_example_1.png similarity index 100% rename from dick_example_1.png rename to assets/dick_example_1.png diff --git a/dick_example_2.png b/assets/dick_example_2.png similarity index 100% rename from dick_example_2.png rename to assets/dick_example_2.png diff --git a/src/constants.ts b/src/constants.ts new file mode 100644 index 0000000..c9362ad --- /dev/null +++ b/src/constants.ts @@ -0,0 +1,40 @@ +import { templatePathBuilder } from "./utils/utils" + +/* ------------------- USER CONSTANTS ------------------------ */ + +// Variable to set DICK to run as a submodule to ASS or separately +// true = submodule | false = separate +export const DICK_SUBMODULE = false + +/* ------------------- ASS HOST INFORMATION ---------------------------- */ +// Boolean variable if your ASS is secured with HTTPS +// true = https | false = http +export const ASS_SECURE = false + +// This is the domain your ASS is hosted at: "127.0.0.1" | "cdn.domain.com" +export const ASS_DOMAIN = "127.0.0.1:40115" + +// If running DICK in separate mode, it will need to know where your ASS is installed +// do note that it must be a *relative* location. +// For example "../ass" means ass is installed in the parent directory. +export const ASS_LOCATION = "../ass" + +/* ------------------- STAFF ID CONSTANTS ---------------------------- */ +// this will eventually be moved away from constants +// Array of all USERNAMES in your ASS auth.json file that will have admin access: ["ass", "dick", "frank"] +export const STAFF_IDS = ["ass"] + + +/* ------------------- SYSTEM CONSTANTS ------------------------ */ +// Port to run the server on, change if you have something else running on that port +export const PORT = "3000" + +/* ------------------- TEMPLATE PATH CONSTANTS ------------------------ */ +export const TEMPLATE = { + USER: templatePathBuilder("/user.ejs"), + PUBLIC: templatePathBuilder("/public.ejs"), + ERRORS: { + 403: templatePathBuilder("/errors/403.ejs"), + 404: templatePathBuilder("/errors/404.ejs") + } +}