Skip to content

Commit 961fe63

Browse files
authored
Merge pull request #733 from 2anki/chore/add-env-example
chore: add env example
2 parents 77678b6 + 8ea6ba8 commit 961fe63

File tree

5 files changed

+25
-5
lines changed

5 files changed

+25
-5
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"notion2anki"
88
],
99
"author": "Alexander Alemayhu",
10-
"version": "1.0.0-alpha.11",
10+
"version": "1.0.0-alpha.12",
1111
"engines": {
1212
"node": ">=12.0.0"
1313
},
@@ -17,7 +17,7 @@
1717
"test:watch": "jest --watch",
1818
"start": "npm run dev",
1919
"build": "tsc -p .",
20-
"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",
20+
"dev": "nodemon --watch '**/*.ts' --exec \"ts-node\" src/server.ts",
2121
"lint": "eslint '**/*.ts' '**/*.tsx'",
2222
"lint:fix": "eslint --fix '**/*.ts' '**/*.tsx'",
2323
"purge-js": "rm `find . -name '*.js'|grep -v node_modules`",

src/env.example

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
NOTION_CLIENT_ID=''
2+
NOTION_CLIENT_SECRET=''
3+
NOTION_REDIRECT_URI=''
4+
SENDGRID_API_KEY=''
5+
PATREON_CLIENT_ID=''
6+
PATREON_CLIENT_SECRET=''
7+
PATREON_CLIENT_REDIRECT=''
8+
THE_HASHING_SECRET=''
9+
DOMAIN=''
10+
WEB_BUILD_DIR=''
11+
WORKSPACE_BASE=''
12+
CREATE_DECK_DIR=''
13+
SPACES_DEFAULT_BUCKET_NAME=''
14+
SPACES_ENDPOINT=''
15+
WORKSPACE_BASE=''

src/lib/anki/CardGenerator.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ class CardGenerator {
2424
const tdir = resolvePath(__dirname, '../../templates/');
2525

2626
const createDeckScriptPathARGS = [CREATE_DECK_SCRIPT_PATH, dpayload, tdir];
27+
console.log('execFile', PYTHON(), createDeckScriptPathARGS);
2728
return new Promise((resolve, reject) => {
2829
execFile(
2930
PYTHON(),

src/lib/debug/index.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
1+
/**
2+
* If the default bucket is not set, we can safely assume we are running in debug mode.
3+
* @returns boolean
4+
*/
15
export const IsDebug = () =>
2-
process.env.SPACES_DEFAULT_BUCKET_NAME == 'dev.2anki.net';
6+
process.env.SPACES_DEFAULT_BUCKET_NAME === undefined;

0 commit comments

Comments
 (0)