File tree Expand file tree Collapse file tree 3 files changed +104
-0
lines changed
Expand file tree Collapse file tree 3 files changed +104
-0
lines changed Original file line number Diff line number Diff line change 1+ name : lint
2+
3+ on : push
4+
5+ jobs :
6+ lint :
7+ runs-on : ubuntu-latest
8+
9+ steps :
10+ - uses : actions/checkout@v2
11+
12+ - name : Cache node modules
13+ uses : actions/cache@v2
14+ env :
15+ cache-name : cache-node-modules
16+ with :
17+ path : ~/.npm
18+ key : ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
19+ restore-keys : |
20+ ${{ runner.os }}-build-${{ env.cache-name }}-
21+ ${{ runner.os }}-build-
22+ ${{ runner.os }}-
23+
24+ - name : Install Dependencies
25+ run : npm install
26+
27+ - name : Lint
28+ run : npm run lint
Original file line number Diff line number Diff line change 1+ name : test
2+
3+ on : push
4+
5+ jobs :
6+ test :
7+ runs-on : ubuntu-latest
8+
9+ steps :
10+ - uses : actions/checkout@v2
11+
12+ - name : Cache node modules
13+ uses : actions/cache@v2
14+ env :
15+ cache-name : cache-node-modules
16+ with :
17+ path : ~/.npm
18+ key : ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
19+ restore-keys : |
20+ ${{ runner.os }}-build-${{ env.cache-name }}-
21+ ${{ runner.os }}-build-
22+ ${{ runner.os }}-
23+
24+ - name : Install Dependencies
25+ run : npm install
26+
27+ - name : Test
28+ run : npm run test
Original file line number Diff line number Diff line change 1+ # TypeScript Express API Bootstrap (base / project starter)
2+
3+ This is a repository intended to serve as a starting point if you want to bootstrap a express API project in TypeScript.
4+
5+ ## Features
6+
7+ - [ TypeScript] ( https://www.typescriptlang.org/ ) (v4)
8+ - [ ts-node-dev] ( https://github.com/wclr/ts-node-dev )
9+ - [ Prettier] ( https://prettier.io/ )
10+ - [ ESLint] ( https://eslint.org/ ) with:
11+ - [ Simple Import Sort] ( https://github.com/lydell/eslint-plugin-simple-import-sort/ )
12+ - [ Import plugin] ( https://github.com/benmosher/eslint-plugin-import/ )
13+ - [ Jest] ( https://jestjs.io ) with [ DOM Testing Library] ( https://testing-library.com/docs/dom-testing-library/intro )
14+ - [ GitHub Action workflows] ( https://github.com/features/actions ) set up to run tests and linting on push
15+
16+ ## Running the app
17+
18+ ```
19+ # install dependencies
20+ npm install
21+
22+ # run in dev mode on port 3000
23+ npm run dev
24+
25+ # generate production build
26+ npm run build
27+
28+ # run generated content in dist folder on port 3000
29+ npm run start
30+ ```
31+
32+ ## Testing
33+
34+ ### Jest with supertest
35+
36+ ```
37+ npm run test
38+ ```
39+
40+ ## Linting
41+
42+ ```
43+ # run linter
44+ npm run lint
45+
46+ # fix lint issues
47+ npm run lint:fix
48+ ```
You can’t perform that action at this time.
0 commit comments