express-generator-typescript 2.1.5 → 2.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,7 +3,7 @@ NODE_ENV=development
3
3
 
4
4
 
5
5
  ## Server ##
6
- PORT=3001
6
+ PORT=3000
7
7
  HOST=localhost
8
8
 
9
9
 
@@ -9,7 +9,8 @@ import dotenv from 'dotenv';
9
9
  import commandLineArgs from 'command-line-args';
10
10
 
11
11
 
12
- // Setup command line options
12
+ // **** Setup command line options **** //
13
+
13
14
  const options = commandLineArgs([
14
15
  {
15
16
  name: 'env',
@@ -19,9 +20,11 @@ const options = commandLineArgs([
19
20
  },
20
21
  ]);
21
22
 
22
- // Set the env file
23
+
24
+ // **** Set the env file **** //
25
+
23
26
  const result2 = dotenv.config({
24
- path: path.join(__dirname, `env/${String(options.env)}.env`),
27
+ path: path.join(__dirname, `../env/${String(options.env)}.env`),
25
28
  });
26
29
 
27
30
  if (result2.error) {
@@ -35,7 +35,7 @@ export interface ISessionUser extends JwtPayload {
35
35
  // **** Functions **** //
36
36
 
37
37
  /**
38
- * Middleware to verify if user logged in.
38
+ * Middleware to verify user logged in and is an an admin.
39
39
  */
40
40
  export async function adminMw(
41
41
  req: Request,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "express-generator-typescript",
3
- "version": "2.1.5",
3
+ "version": "2.1.6",
4
4
  "description": "Generate new Express applications similar to express-generate which but sets it up to use TypeScript instead",
5
5
  "scripts": {
6
6
  "express-generator-typescript": "node bin/cli.js",