Skip to content

Commit

Permalink
Merge pull request #733 from 2anki/chore/add-env-example
Browse files Browse the repository at this point in the history
chore: add env example
  • Loading branch information
aalemayhu authored Jul 2, 2022
2 parents 77678b6 + 8ea6ba8 commit 961fe63
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 5 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"notion2anki"
],
"author": "Alexander Alemayhu",
"version": "1.0.0-alpha.11",
"version": "1.0.0-alpha.12",
"engines": {
"node": ">=12.0.0"
},
Expand All @@ -17,7 +17,7 @@
"test:watch": "jest --watch",
"start": "npm run dev",
"build": "tsc -p .",
"dev": " SPACES_DEFAULT_BUCKET_NAME=dev.2anki.net SPACES_ENDPOINT=fra1.digitaloceanspaces.com WORKSPACE_BASE=/tmp/w nodemon --watch '**/*.ts' --exec \"ts-node\" src/server.ts",
"dev": "nodemon --watch '**/*.ts' --exec \"ts-node\" src/server.ts",
"lint": "eslint '**/*.ts' '**/*.tsx'",
"lint:fix": "eslint --fix '**/*.ts' '**/*.tsx'",
"purge-js": "rm `find . -name '*.js'|grep -v node_modules`",
Expand Down
15 changes: 15 additions & 0 deletions src/env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
NOTION_CLIENT_ID=''
NOTION_CLIENT_SECRET=''
NOTION_REDIRECT_URI=''
SENDGRID_API_KEY=''
PATREON_CLIENT_ID=''
PATREON_CLIENT_SECRET=''
PATREON_CLIENT_REDIRECT=''
THE_HASHING_SECRET=''
DOMAIN=''
WEB_BUILD_DIR=''
WORKSPACE_BASE=''
CREATE_DECK_DIR=''
SPACES_DEFAULT_BUCKET_NAME=''
SPACES_ENDPOINT=''
WORKSPACE_BASE=''
1 change: 1 addition & 0 deletions src/lib/anki/CardGenerator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class CardGenerator {
const tdir = resolvePath(__dirname, '../../templates/');

const createDeckScriptPathARGS = [CREATE_DECK_SCRIPT_PATH, dpayload, tdir];
console.log('execFile', PYTHON(), createDeckScriptPathARGS);
return new Promise((resolve, reject) => {
execFile(
PYTHON(),
Expand Down
6 changes: 5 additions & 1 deletion src/lib/debug/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
/**
* If the default bucket is not set, we can safely assume we are running in debug mode.
* @returns boolean
*/
export const IsDebug = () =>
process.env.SPACES_DEFAULT_BUCKET_NAME == 'dev.2anki.net';
process.env.SPACES_DEFAULT_BUCKET_NAME === undefined;

0 comments on commit 961fe63

Please sign in to comment.