Skip to content

Commit

Permalink
✨ feat(gg): ddd
Browse files Browse the repository at this point in the history
  • Loading branch information
thrownullexception committed Oct 20, 2023
1 parent 2e19cc4 commit 3b51814
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
"bin": "./bin/dashpress",
"dependencies": {
"@types/lodash": "^4.14.182",
"@types/nprogress": "^0.2.0",
"@types/qs": "^6.9.7",
"@types/ramda": "0.27.40",
"@types/react": "^18.0.11",
Expand Down Expand Up @@ -77,7 +76,6 @@
"date-fns": "^2.28.0",
"final-form": "^4.20.7",
"immer": "9.0.3",
"nprogress": "^0.2.0",
"qs": "^6.11.0",
"ramda": "0.27.1",
"randomstring": "^1.2.2",
Expand Down
16 changes: 6 additions & 10 deletions src/bin/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,12 @@ import { checkNodeVersion } from "./checkNodeVersion";

const { default: fetch } = await import("node-fetch");

const generateRandomString = (length = 12): string => {
return randomstring.generate(length);
};

const replaceRandomCharaters = (envContent: string) => {
return ["CREDENTIALS_ENCRYPTION_KEY", "AUTH_TOKEN_KEY"].reduce(
(reducedEnvContent, currentKey) => {
return reducedEnvContent.replace(
`${currentKey}=RANDOM_CHARACTERS`,
`${currentKey}=${generateRandomString(128)}`
`${currentKey}=${randomstring.generate(128)}`
);
},
envContent
Expand Down Expand Up @@ -61,11 +57,11 @@ import { checkNodeVersion } from "./checkNodeVersion";
console.log(`
/$$ /$$
| $$ | $$
/$$$$$$$ /$$$$$$ /$$$$$$$| $$$$$$$ /$$$$$$ /$$$$$$ / $$$$$$ /$$$$$$$ /$$$$$$$
/$$$$$$$ /$$$$$$ /$$$$$$$| $$$$$$$ /$$$$$$ /$$$$$$ / $$$$$$$$ /$$$$$$$ /$$$$$$$
/$$__ $$ |____ $$ /$$_____/| $$__ $$ / $$__ $$/ $$__ $$ / $$__ $$ /$$_____//$$_____/
| $$ | $$ /$$$$$$$| $$$$$$ | $$ \\ $$ | $$ \\ $$| $$ \\__/| $$$$$$$$| $$$$$$| $$$$$$
| $$ | $$ /$$__ $$ \\____$$ | $$ | $$ | $$ | $$| $$ | $$_____/\\____ $$\\____ $$
| $$$$$$$| $$$$$$$ /$$$$$$$/| $$ | $$ | $$$$$$$/| $$ | $$$$$$$ /$$$$$$$//$$$$$$$/
| $$ | $$ / $$__ $$ \\____$$ | $$ | $$ | $$ | $$| $$ | $$_____/\\____ $$\\____ $$
| $$$$$$$ | $$$$$$$ /$$$$$$$/| $$ | $$ | $$$$$$$/| $$ | $$$$$$$ /$$$$$$$//$$$$$$$/
\\_______/ \\_______/|_______/ |__/ |__/| $$____/ |__/ \\_______/|_______/|_______/
| $$
| $$
Expand Down Expand Up @@ -105,12 +101,12 @@ import { checkNodeVersion } from "./checkNodeVersion";
cwd: path.join(__dirname, ".."),
});

const WAIT_FOR_NEXT_TO_START = 1000;

console.log(
`🚀 Application started successfully at ${terminalLink(endpoint, endpoint)}`
);

const WAIT_FOR_NEXT_TO_START = 1000;

/*
We want to ping the application to bootstrap itself from here
Else it boostraps on the first request which messes a lot of things up
Expand Down

0 comments on commit 3b51814

Please sign in to comment.