express-generator-typescript-k8s
Version:
Generate a new Express applications similar to express-generate with Kubernetes client and Typescript configured.
22 lines (18 loc) • 404 B
text/typescript
import dotenv from 'dotenv';
import commandLineArgs from 'command-line-args';
// Setup command line options
const options = commandLineArgs([
{
name: 'env',
alias: 'e',
defaultValue: 'development',
type: String,
},
]);
// Set the env file
const result2 = dotenv.config({
path: `./env/${options.env}.env`,
});
if (result2.error) {
throw result2.error;
}