Skip to content

Commit 3893039

Browse files
authored
chore: update readme.md for better devex on windows (#664)
1 parent 0afc50c commit 3893039

File tree

3 files changed

+92
-57
lines changed

3 files changed

+92
-57
lines changed

README.md

Lines changed: 28 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
### A Dockerized Nodejs Express Boilerplate with TypeScript
22

33
#### Why
4-
The main idea behind this app is that, We like you to be focused on your business and not spending hours in project configuration.
4+
5+
The main idea behind this app is that, We like you to be focused on your business and not spending hours in project configuration.
56

67
Give this a try!! We are more than happy to hear your feedback or feature request.
78

89
---
910

1011
#### About
1112

12-
A comprehensive template. Works out of the box for most Node.js projects with following pieces
13+
A comprehensive template. Works out of the box for most Node.js projects with following pieces
1314

1415
- [Docker] as the container service to isolate the environment.
1516
- [Node.js](Long-Term-Support Version) as the run-time environment to run JavaScript.
@@ -25,27 +26,34 @@ A comprehensive template. Works out of the box for most Node.js projects with fo
2526

2627
#### Features
2728

28-
+ TypeScript
29-
+ ESLint with some initial rules recommendation
30-
+ Jest for fast unit testing and code coverage
31-
+ Type definitions for Node.js and Jest
32-
+ NPM scripts for common operations
33-
+ Simple example of TypeScript code and unit test
34-
+ Example configuration for GitHub Actions
29+
- TypeScript
30+
- ESLint with some initial rules recommendation
31+
- Jest for fast unit testing and code coverage
32+
- Type definitions for Node.js and Jest
33+
- NPM scripts for common operations
34+
- Simple example of TypeScript code and unit test
35+
- Example configuration for GitHub Actions
3536

3637
---
3738

38-
### Getting Started
39+
##### Getting Started
3940

4041
#### Docker
42+
4143
- Clone the repository
4244
- Run `docker-compose up`
4345

4446
#### Without Docker
47+
4548
- Clone the repository
49+
50+
You need to install postgreSQL manually for the installation [guide](https://www.enterprisedb.com/downloads/postgres-postgresql-downloads)
51+
4652
- Run `npm install`
47-
- Run `npm run typeorm migration:run`*
48-
- Run `npm run watch`
53+
- Run `npm run typeorm schema:sync`
54+
- Run `npm run typeorm migration:run`
55+
- Run `npm i ts-node -g`
56+
- Run `npm run dev`
4957

5058
\* You need to set environment variables to provide configuration for database connection. Please see `src/config.ts` for environment variable names.
5159

@@ -58,14 +66,14 @@ The API will be useable from the documentation available at http://localhost:300
5866

5967
### Available Scripts
6068

61-
+ `clean` - remove coverage data, Jest cache and transpiled files,
62-
+ `build` - transpile TypeScript to ES6,
63-
+ `build:watch` - interactive watch mode to automatically transpile source files,
64-
+ `lint` - lint source files and tests,
65-
+ `test` - run tests,
66-
+ `test:watch` - interactive watch mode to automatically re-run tests
67-
+ `watch` - automatically restart the application when file changes in the directory are detected
68-
69+
- `clean` - remove coverage data, Jest cache and transpiled files,
70+
- `build` - transpile TypeScript to ES6,
71+
- `build:watch` - interactive watch mode to automatically transpile source files,
72+
- `lint` - lint source files and tests,
73+
- `test` - run tests,
74+
- `test:watch` - interactive watch mode to automatically re-run tests
75+
- `watch` - automatically restart the application when file changes in the directory are detected
6976

7077
### License
78+
7179
[MIT](/LICENSE)

package-lock.json

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

package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
"scripts": {
77
"lint": "eslint . --ext .ts,.tsx --fix",
88
"clean": "rimraf coverage build tmp",
9-
"dev": "nodemon -e 'yml, yaml, js, ts, tsx, json' -x 'ts-node' src/server.ts | bunyan -o simple",
10-
"typeorm": "./node_modules/.bin/ts-node ./node_modules/typeorm/cli.js",
9+
"dev": "nodemon -e \"yml, yaml, js, ts, tsx, json\" -x \"ts-node\" src/server.ts | bunyan -o simple",
10+
"typeorm":"node --require ts-node/register ./node_modules/typeorm/cli.js" ,
1111
"compile": "tsc -p tsconfig.release.json",
1212
"watch:compile": "tsc -w -p tsconfig.release.json",
1313
"test": "npm run compile && npm run lint && jest --passWithNoTests --runInBand --silent",
@@ -29,34 +29,34 @@
2929
"@types/express-bunyan-logger": "1.3.3",
3030
"@types/hapi__joi": "17.1.8",
3131
"@types/node": "15.6.1",
32+
"@types/supertest": "2.0.11",
3233
"@types/swagger-jsdoc": "6.0.1",
3334
"@types/swagger-ui-express": "4.1.3",
3435
"@typescript-eslint/eslint-plugin": "^4.22.1",
3536
"@typescript-eslint/parser": "^4.22.1",
3637
"body-parser": "1.19.1",
3738
"bunyan": "2.0.5",
38-
"convict": "6.2.1",
39-
"eslint": "^7.25.0",
4039
"class-transformer": "0.5.1",
4140
"class-validator": "0.12.2",
41+
"convict": "6.2.1",
42+
"eslint": "^7.25.0",
4243
"eslint-import-resolver-node": "^0.3.4",
4344
"eslint-import-resolver-typescript": "^2.4.0",
4445
"eslint-plugin-import": "^2.22.1",
4546
"eslint-plugin-jest": "^25.0.1",
4647
"express": "4.17.2",
4748
"express-bunyan-logger": "1.3.3",
4849
"helmet": "5.0.1",
49-
"pg": "8.7.1",
50+
"pg": "^8.7.3",
5051
"reflect-metadata": "^0.1.13",
5152
"routing-controllers": "0.9.0",
53+
"supertest": "6.1.6",
5254
"swagger-jsdoc": "6.1.0",
5355
"swagger-ui-express": "4.3.0",
5456
"ts-node": "10.4.0",
5557
"typedi": "0.8.0",
56-
"typeorm": "0.2.41",
57-
"typescript": "4.5.4",
58-
"@types/supertest": "2.0.11",
59-
"supertest": "6.1.6"
58+
"typeorm": "^0.2.41",
59+
"typescript": "4.5.4"
6060
},
6161
"devDependencies": {
6262
"@types/jest": "27.4.0",

0 commit comments

Comments
 (0)