Skip to content

Commit

Permalink
updated readme and merged pull request 31
Browse files Browse the repository at this point in the history
  • Loading branch information
seanpmaxwell committed Jun 6, 2020
1 parent 4d2778a commit 6a7a149
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 7 deletions.
7 changes: 7 additions & 0 deletions README.md
Expand Up @@ -87,6 +87,13 @@ $ cd "project name" && npm run start:dev
- Run production build with a different env file `npm start -- --env="name of env file" (default is production)`.


## Debugging
During development, _express-generator-typescript_ uses `nodemon` to restart the server when changes
are detected. If you want to enable debugging for node, you'll need to modify the nodemon configurations.
This is located under `nodemonConfig:` in `package.json` for the server and `./spec/nodemon.json` for
unit-testing. For the `exec` property, replace `ts-node` with `node --inspect -r ts-node/register`.


## Note for windows users

If you use the `--with-auth` option and are on Windows, the `bcrypt` module tends to be fussy. To
Expand Down
7 changes: 7 additions & 0 deletions express-generator-typescript/README.md
Expand Up @@ -87,6 +87,13 @@ $ cd "project name" && npm run start:dev
- Run production build with a different env file `npm start -- --env="name of env file" (default is production)`.


## Debugging
During development, _express-generator-typescript_ uses `nodemon` to restart the server when changes
are detected. If you want to enable debugging for node, you'll need to modify the nodemon configurations.
This is located under `nodemonConfig:` in `package.json` for the server and `./spec/nodemon.json` for
unit-testing. For the `exec` property, replace `ts-node` with `node --inspect -r ts-node/register`.


## Note for windows users

If you use the `--with-auth` option and are on Windows, the `bcrypt` module tends to be fussy. To
Expand Down
2 changes: 1 addition & 1 deletion express-generator-typescript/lib/auth-proj/src/Server.ts
Expand Up @@ -23,7 +23,7 @@ const app = express();

app.use(express.json());
app.use(express.urlencoded({extended: true}));
app.use(cookieParser(process.env.COOKIE_SECRET));
app.use(cookieParser(cookieProps.secret));

// Show routes called in console during development
if (process.env.NODE_ENV === 'development') {
Expand Down
2 changes: 1 addition & 1 deletion express-generator-typescript/package.json
@@ -1,6 +1,6 @@
{
"name": "express-generator-typescript",
"version": "1.6.4",
"version": "1.6.5",
"description": "Generate new Express applications similar to express-generate which but sets it up to use TypeScript instead",
"scripts": {
"express-generator-typescript": "node bin/cli.js",
Expand Down
2 changes: 1 addition & 1 deletion sample-output/withAuth/dist/Server.js
Expand Up @@ -14,7 +14,7 @@ const constants_1 = require("@shared/constants");
const app = express_1.default();
app.use(express_1.default.json());
app.use(express_1.default.urlencoded({ extended: true }));
app.use(cookie_parser_1.default(process.env.COOKIE_SECRET));
app.use(cookie_parser_1.default(constants_1.cookieProps.secret));
if (process.env.NODE_ENV === 'development') {
app.use(morgan_1.default('dev'));
}
Expand Down
2 changes: 1 addition & 1 deletion sample-output/withAuth/logs/combined.log
@@ -1 +1 @@
{"message":"Express server started on port: 8081","level":"info","timestamp":"2020-05-31T23:00:38.245Z"}
{"message":"Express server started on port: 8081","level":"info","timestamp":"2020-06-06T16:33:44.196Z"}
6 changes: 3 additions & 3 deletions sample-output/withAuth/package.json
Expand Up @@ -50,11 +50,11 @@
"@types/jsonfile": "^6.0.0",
"@types/jsonwebtoken": "^8.5.0",
"@types/morgan": "^1.9.0",
"@types/node": "^14.0.6",
"@types/node": "^14.0.11",
"@types/randomstring": "^1.1.6",
"@types/supertest": "^2.0.9",
"find": "^0.3.0",
"fs-extra": "^9.0.0",
"fs-extra": "^9.0.1",
"jasmine": "^3.5.0",
"jsonfile": "^6.0.1",
"nodemon": "^2.0.4",
Expand All @@ -63,6 +63,6 @@
"tsconfig-paths": "^3.9.0",
"tslint": "^6.1.2",
"tslint-lines-between-class-members": "^1.3.6",
"typescript": "^3.9.3"
"typescript": "^3.9.5"
}
}

0 comments on commit 6a7a149

Please sign in to comment.