Addded: .env.example, fixed build

This commit is contained in:
Filip Rojek 2024-05-02 00:09:26 +02:00
parent 96900fd3b3
commit 3227854086
5 changed files with 19 additions and 3 deletions

1
api/.gitignore vendored
View File

@ -1,3 +1,4 @@
node_modules/
dist/
package-lock.json
.env

View File

@ -11,7 +11,7 @@
"start:prod": "node dist/server.js",
"tsc": "tsc -p .",
"clean": "rimraf dist",
"copy-assets": "ts-node src/utils/copyAssets",
"copy-assets": "ts-node src/utils/copy_assets",
"build": "npm-run-all clean tsc copy-assets",
"test": "npx jest . --runInBand",
"format": "npx prettier --write ."

6
api/src/.env.example Normal file
View File

@ -0,0 +1,6 @@
APP_PORT=6060
APP_HOST=127.0.0.1
JWT_SECRET=generate_random_secret
DB_URI='mongodb://username:password@localhost:27017/database?authSource=admin'

View File

@ -0,0 +1,6 @@
import * as shell from 'shelljs';
// Copy all the view templates
//shell.cp('-R', 'src/views', 'dist/')
//shell.cp('-R', 'src/public', 'dist/');
shell.cp('-u', 'src/.env', 'dist/');

View File

@ -7,9 +7,12 @@
"strict": true /* Enable all strict type-checking options. */,
"baseUrl": "./" /* Base directory to resolve non-absolute module names. */,
"esModuleInterop": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables `allowSyntheticDefaultImports` for type compatibility. */,
"resolveJsonModule": true,
"experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
"emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
"skipLibCheck": true /* Skip type checking all .d.ts files. */,
"forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */,
"declaration": true
//"declaration": true, /* Enables experimental support for emitting type metadata for decorators. */
},
"exclude": ["_old", "node_modules", "src/make-files", "src/skeletons", "src/tests", "src/interfaces", "src/utils"]
"exclude": ["src/tests", "./tests"]
}